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順序應(yīng)該是按這樣子但實際返回給我請問in的排序sql怎樣寫,謝謝!
Sqlserver中根據(jù)in的順序排序
四季花海
2018-08-23 10:13:08