Info-lake
Knowledge sharing....
March 25, 2013
selectRandom rows from table
suppose we want a random records from table, we can use newID function of sql to get random records.
SELECT top 5 AccountID from AccountMaster
ORDER BY newid() DESC
After executing this query you will each time new random rows.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment