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', ' ', '')) + ',')
相關文章
相關標籤/搜索