oracle 空值排序,排在最前面或者最后面

 

1,排在最前面用order by name nulls first;(name是字段名)

 

eg:select t.name,t.code from table  t where t.code!='1' order by t.name nulls first;

 

2,排在最后面order by name nulls last;(name是字段名)

 

eg:select t.name,t.code from table t where t.code!='1' order by t.name nulls last;

posted @ 2018-10-14 18:04  36度  阅读(3599)  评论(0编辑  收藏  举报