select * from tablename
Where id in (15,12,34,44,2)
Order by (Case When id = 15 then 0
When id = 12 then 1
When id = 34 then 2
When id = 44 then 3
When id = 2 then 4 Else id End)
Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts
Wednesday, September 07, 2011
Subscribe to:
Posts (Atom)