sql order by 排序控制

SELECT *
  FROM table ta
order by case  ta.* when 3 then 3 when 2 then 1 when 1 then 2 end, ta.id desc

猜你喜欢

转载自cainiaoyu.iteye.com/blog/1960034