mssql where in 按照 in 中的进行排序
Select * FROM NodeTable Where(idNode IN(2247,4,82538,71994,2245)) ORDER BY CHARINDEX(',' + CONVERT(nvarchar, idNode) + ',', ',' + CONVERT(nvarchar, Replace('2247,4,82538,71994,2245', ' ', '')) + ',')
原创
2018-06-12 15:08:17 ·
807 阅读 ·
0 评论