一、根据某时间排序,时间为空则优先排序,不为空则倒序排序:(适用于一个字段是否为空决定其排序不一样时)code
select * from tb_user order by (1- ISNULL(updated) ) , updated desc ;
二、排序