SELECT * FROM table_name as t1 WHERE t1.id>=(RAND()*(SELECT MAX(id) FROM table_name))LIMIT 1;
Mysql 随机获取单条或多条数据
最新推荐文章于 2024-04-19 00:00:13 发布
SELECT * FROM table_name as t1 WHERE t1.id>=(RAND()*(SELECT MAX(id) FROM table_name))LIMIT 1;