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的顺序检索出来,请问如何书写?
我家大狗最最萌
浏览 1479回答 2
2回答
产品经理不是经理
//mysql使用field函数进行排序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);