sql where in 排序问题
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                sql where in 排序问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                直接上代碼了
對于int類型的需要轉化一下
select * from cvProducts where ID in(972,687,678,962) order by charindex(cast(ID as varchar),'972,687,678,962')?
對于varchar的直接使用
select * from cvProducts where MouldNo in('C62859','C63417','C32283') order by charindex(MouldNo, 'C62859,C63417,C32283')?
轉載于:https://www.cnblogs.com/youmeng/archive/2013/06/09/3128278.html
總結
以上是生活随笔為你收集整理的sql where in 排序问题的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: php如何使用代码生成pdf文件,教你利
- 下一篇: java filefilter的用法_J
