日期:2014-05-16 浏览次数:20692 次
name | age |
zhangsan | 1 |
lisi | NULL |
wangwu | 2 |
select * from t_user order by age;
name | age |
lisi | NULL |
zhangsan | 1 |
wangwu | 2 |
select * from t_user order by age is null, age;
name | age |
zhangsan | 1 |
wangwu | 2 |
lisi | NULL |
select * from t_user order by age is null, age;
select * from (select name, age, (age is null) as isnull from t_user) as foo order by isnull, age;