SQL Server:
SELECT TOP 1 *
FROM Users
ORDER BY NEWID()
MySQL:
SELECT * FROM Users
ORDER BY RAND()
LIMIT 1;
Oracle:
SELECT * FROM
(SELECT * FROM Users
ORDER BY dbms_random.value )
WHERE rownum = 1
PostgreSQL:
SELECT * FROM Users
ORDER BY RANDOM()
LIMIT 1
Access:
SELECT TOP 1 *
FROM Users
ORDER BY Rnd(UserID)
Cheers!
0 comments:
Post a Comment