select * from CC t order by case when test = 4 then 0 else 1 end , phone desc
在oder by 加上 CASE WHEN 你要置前行的条件表达式 THEN 0 ELSE 1 END
比如:
select * from tableX order by case when name = "mmmm" then 0 else 1 end , id
select * from CC t order by case when test = 4 then 0 else 1 end , phone desc
在oder by 加上 CASE WHEN 你要置前行的条件表达式 THEN 0 ELSE 1 END
比如:
select * from tableX order by case when name = "mmmm" then 0 else 1 end , id