the newid() function creates a unique value of type uniqueidentifier.
For example:
SELECT newid()
031FF281-A80A-4836-B2B4-81F9A6D0536E
We can use this function to randomly sort records, It's simple:
SELECT * FROM tbl_name
ORDER BY newid()
Have fun.Just Me... What else can I say...
Success comes to those who have the courage to try
No comments:
Post a Comment