更新时间:2023-02-07 13:32:03
You can use the rand
function in MySQL to order the rows, and then take the top 10 (or however many you want) with limit
.
select * from table order by rand() limit 10
如果您只想数学问题:
select * from table where type = 1 order by rand() limit 10