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的顺序检索出来:
select * from table where id in(10,32,22,76,13,44) order by field (id,10,32,22,76,13,44);
(select * from table where ID = 10) union (select * from table where ID = 32) union (select * from table where ID = 22) union (select * from table where ID = 76) union (select * from table where ID = 13) union (select * from table where ID = 44)