select ptp.id from [dbo].[Pic_Temp_Process] ptp where ptp.id in
(5599, 1763317, 1130129, 505992, 174477, 23565, 1192438) order by
charindex(','+convert(varchar,ptp.id)+',',',5599, 1763317, 1130129, 505992, 174477, 23565, 1192438,')
我的语句
5599, 1763317, 1130129, 505992, 174477, 23565, 1192438
顺序应该是按这样子
但实际返回给我
请问in的排序sql怎样写,谢谢!
相关分类