MysqL: select * from tablename order by rand() limit 10 sqlserver: select top 10 * from tablename order by NEWID() sqlite:Select * From tablename order by random(*) limit 10 Oracle: SELECT column FROM ( SELECT column FROM table ORDER BY dbms_random.value ) WHERE rownum <= 10 Postgresql: SELECT column FROM table ORDER BY RANDOM() LIMIT 10原文链接:https://www.f2er.com/postgresql/196590.html