mysql order by 依据 in 的顺序排序

mysql order by 根据 in 的顺序排序

使用关键字field

 

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