mysql按in使用 field方法排序发布于 2018 年 5 月 29 日全文约 60 字·预计阅读 1 分钟 假设test表中有A,B字段 id字段中有19, 23, 21, 2, 129... 要求:19, 23, 21, 2, 129剩下的按照b字段正序排列 select * from test order by field(a,19,23,21,2,129) desc , b asc 效率有待考证 mysql按in使用 field方法排序https://www.netpc.com.cn/blog/archives/2678.html分享文章目录×mysql按in使用 field方法排序← 上一篇javascript把毫秒转换为小时/分钟/秒的格式下一篇 →同时可用git命令clone和TortoiseGit拉取代码不需要密码发表评论提交评论 评论 0 条暂无评论,来说点什么吧。
假设test表中有A,B字段 id字段中有19, 23, 21, 2, 129... 要求:19, 23, 21, 2, 129剩下的按照b字段正序排列 select * from test order by field(a,19,23,21,2,129) desc , b asc 效率有待考证
评论 0 条
暂无评论,来说点什么吧。