sql where in 排序问题
直接上代码了
对于int类型的需要转化一下
select * from cvProducts where ID in(972,687,678,962) order by charindex(cast(ID as varchar),'972,687,678,962')
对于varchar的直接使用
select * from cvProducts where MouldNo in('C62859','C63417','C32283') order by charindex(MouldNo, 'C62859,C63417,C32283')