Hi All,
I have a table named Temp_Table which has 6 rows, like below example:
Col1 Col2
1 AAAA
2 BBBB
3 CCCC
4 DDDD
5 EEEE
6 FFFF
My query is:
Select * from Temp_Table where Col1 in (3,6,1)
The result which is get is:
Col1 Col2
1 AAAA
3 CCCC
6 FFFF
But I am expecting the result to be in the same order of what is passed in the IN clause, like below:
Col1 Col2
3 CCCC
6 FFFF
1 AAAA
How can i do this with a SQL query, am i going wrong with using the IN clause. Please help me solve this issue, I am a c# developer with very little knowledge about query... And I am using SQL Server
Thanks,
Nancy