mysql记录

Mysql中的FIELD函数

  1. SQL中查询结果集进行指定顺序排序
1
select * from table where id IN (3,6,9,1,2,5,8,7) order by field(id,3,6,9,1,2,5,8,7);