Is it possible to randomize SELECT based on a key?
I used this query for a random query:
SELECT * FROM tbl_news ORDER BY NEWID();
Is there a key-based function or method similar to random :
SELECT * FROM tbl_news ORDER BY NEWID(15);
5,1,3,2,4
Using the same key :
SELECT * FROM tbl_news ORDER BY NEWID(15);
5,1,3,2,4
Using another :
SELECT * FROM tbl_news ORDER BY NEWID(36);
2,5,1,3,4
source
share