select *,
case
when id=2003 then 1
when id=1342 then 2
when id=799 then 3
when id=1450 then 4
end as ob
from
tablename
where
id in (2003,1342,799,1450)
order by
ob;
ORDER records based on parameters in IN clause
最新推荐文章于 2021-06-15 21:09:45 发布