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.
SELECT top 5 AccountID from AccountMaster
ORDER BY newid() DESC
After executing this query you will each time new random rows.
Comments
Post a Comment