发布网友 发布时间:2023-03-02 21:25
共1个回答
热心网友 时间:2023-09-15 19:00
数据库的随机查询SQL \x0d\x0a\x0d\x0a1. Oracle,随机查询20条\x0d\x0aselect * from\x0d\x0a(\x0d\x0aselect * from 表名\x0d\x0aorder by dbms_random.value\x0d\x0a)\x0d\x0awhere rownum <= 20;\x0d\x0a\x0d\x0a2.MS SQL Server,随机查询20条\x0d\x0aselect top 20 * from 表名order by newid()\x0d\x0a\x0d\x0a3.My SQL:,随机查询20条\x0d\x0aselect * from 表名 order by rand() limit 20