MySQL如何随机筛选25000条数据
一、SELECT * FROM sheet1 t1 ORDER BY RAND() LIMIT 10000;
二、SELECT * FROM sheet1 AS t1 JOIN (SELECT ROUND(RAND() * (SELECT MAX(id) FROM `sheet1`)) AS id) AS t2 WHERE t1.id >= t2.id
ORDER BY t1.id ASC LIMIT 10000;
三、SELECT * FROM `sheet1`WHERE id >= (SELECT FLOOR(RAND() * (SELECT MAX(id) FROM `sheet1`))) ORDER BY id LIMIT 10000;