SQL-按照某一行排序

来源:互联网 发布:sql预编译是什么 编辑:程序博客网 时间:2024/06/14 04:52

-- 把'小明'排在第一位 

select *
  from CUSTOMER_INFO T
 where T.CUSTOMER_ID = 12204
 order by case when name= '小明' then 0 else 1 end asc