Oralce: SQL> select *from (select *from t order by dbms_random.value) where rownum<10;
mysql: select * from tablename order by rand() limit 10 sqlserver: select top 10 * from tablename order by NEWID()