时间:2021-07-01 10:21:17 帮助过:4人阅读
select name from order where oderid in(111,222,333,444,555,666)order by instr(‘111,222,333,444,555,666‘,orderid)
sqlserver写法:
Select * From Product Where id in (1,1588,15782,9887,54) Order By charindex(‘,‘+ id +‘,‘, ‘,1,1588,15782,9887,54,‘)
让sql语句不排序,按照in语句的顺序返回结果
标签: