select*from student where status=1 order by case when id='123456' then 0 else 3 end, case when pbi='252161934' then 0 else 3 end, create_time desc
首先根据id排序,然后根据pbi排序,最后根据create_time排序
select*from student where status=1 order by case when id='123456' then 0 else 3 end, case when pbi='252161934' then 0 else 3 end, create_time desc
首先根据id排序,然后根据pbi排序,最后根据create_time排序