1 select *, rand() as random FROM yef_exercises where id not in(1) order by random limit 1 // Mysql
Mysql 高效随机生成N条记录,布布扣,bubuko.com
Mysql 高效随机生成N条记录
原文:http://www.cnblogs.com/mk9007/p/3733436.html