MySql自己定义排序

查询语句:
select id,name,stauts from special where id in (50,51,52,53,54,55) order by FIELD( id ,51,50, 54,53,52,55)

查询结果是:



查询语句会依据Field 后面的顺序去排序


posted @ 2015-02-18 11:04  blfshiye  阅读(105)  评论(0编辑  收藏  举报