Friday, 2 September 2011

Get record in random order ?

You can get table records randomly with the help of NEWID() function.
NEWID() is a built-in function which returns unique identifier.
Syntax:
select * from TblStudent Order by NEWID()

No comments:

Post a Comment