mysql数据库随机查询distinct

语句是:select distinct(字段名或*) from 表1 a left join 表2 b on a.字段=b.字段 where 条件 order by a.主键(b.主键,rand())(desc) limit start lentgh;

猜你喜欢

转载自guhao022.iteye.com/blog/1859170