标签:
SELECT * FROM Project_Business_Type WHERE Id in (10,25,5,4,15,46,74,500) order by charindex(‘,‘+ltrim(Id)+‘,‘, ‘,10,25,5,4,15,46,74,500,‘)
这里查询出来的结果就是按参数传进来的顺序,10,25,5,4...
order by charindex(‘,‘+ltrim(Id)+‘,‘, ‘,10,25,5,4,15,46,74,500,‘) 排列顺序
标签:
原文地址:http://www.cnblogs.com/tanpangpang/p/4228474.html