日期:2014-05-18 浏览次数:20581 次
select id,name from TB group by id,name,case when name IS null then 1 else 0 end order by case when name IS null then 1 else 0 end /* 1 d 2 b 3 c 7 g 4 NULL 5 NULL 6 NULL
------解决方案--------------------
select id,name from TB order by case when name IS null then 1 else 0 end ,id