🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
解决方案: ``` select * from user where id in(1,2,3,4) order by field(id,3,2,1,4) ``` ![](https://img.kancloud.cn/48/cc/48cc58dba592cb00453cc108d740dca2_628x207.png) 多个字段排序 ~~~ //不在列表中的数据赋予一个较大的排序值 select * from user where id in(1,2,3,4) order by CASE WHEN id IN (33858,33859) THEN FIELD(id, 33859,33858) ELSE 99999999 END ,field (source,1000,20000,30000),category_ids,num desc , ~~~