解决方案: #`table` 你的表名 #LIMIT 1 限制的数量 SELECT * FROM `table` WHERE id >= (SELECT floor(RAND() * (SELECT MAX(id) FROM `table`))) ORDER BY id LIMIT 1;