MySQL 下不规则排序
程序员文章站
2022-04-28 08:57:35
...
SQL查询语句如下:select * from table where (ID = 10) or (ID = 32) or (ID = 22) or (ID = 76) or (ID = 13) or (ID = 44)让结
SQL查询语句如下:
select * from table where (ID = 10) or (ID = 32) or (ID = 22) or (ID = 76) or (ID = 13) or (ID = 44)
让结果按10,32,22,76,13,,44的顺序检索出来,请问如何书写? (sql能力)
select * from table where (ID = 10) or (ID = 32) or (ID = 22) or (ID = 76) or (ID = 13) or (ID = 44) order by field(ID,10,32,22,76,13,44)
下一篇: 关于计算机端打不开一个网址的原因