mysql order by 根据 in 的顺序排序

使用关键字field

... IN(4, 5, 3, 1) ORDER BY FIELD(id, 4, 5, 3, 1)

猜你喜欢

转载自freespace.iteye.com/blog/1771863