SQL中取随机取数量的数据

方法一:

后面发现了还能order by rand(),顺利的解决了这个需求

select * from table where 1 order by rand() limit 10

排序随机,取前十条