//Querry for selecting a random field
SELECT top 1 * FROM dbtable where status=0 order by NEWID()
//Example :
SELECT username FROM login order by NEWID();
Try :
SELECT top 15 (ROW_NUMBER() over (order by userid)) as i,username FROM login order by NEWID();
Monday, August 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment