解决mysql使用in查询排序问题


# 让结果和in里面的排序一致
select * from user where
id in (10000,10001)
order by field(id, 10000,10001);

猜你喜欢

转载自blog.csdn.net/qq_42407917/article/details/109244466