Oracle随机取出若干条记录的SQL语句

====Oracle随机抽取数据

SELECT * FROM (SELECT * FROM STUDENT_INFO ORDER BY DBMS_RANDOM.RANDOM() ) WHERE Rownum <= 10;

====MySql随机抽取数据

SELECT * FROM tablename ORDER BY RAND() LIMIT 10;

 

 

posted @ 2023-07-18 10:54  蜜獾互联网  阅读(34)  评论(0编辑  收藏  举报  来源