SELECT t1.* FROM table_name AS t1 JOIN (SELECT ROUND(RAND()*(SELECT MAX(id)
FROM table_name)) AS id) AS t2 WHERE t1.id>=t2.id ORDER BY t1.id LIMIT 1;
生活其实很有趣
SELECT t1.* FROM table_name AS t1 JOIN (SELECT ROUND(RAND()*(SELECT MAX(id)
FROM table_name)) AS id) AS t2 WHERE t1.id>=t2.id ORDER BY t1.id LIMIT 1;