Oracle 數據空值行位於查詢結果的最前面或者最後面

1,排在最前面用order by name nulls first;

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

2,排在最後面order by name nulls last;

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章