【Oracle】【16】字段值为null的排序问题

正文:

Oracle默认null是最大值

--null值始终排前面
select * from table order by id asc nulls first
--null值始终排后面
select * from table order by id desc nulls last

参考博客:

ORACLE中null的排序问题 - heartdiamond的专栏 - CSDN博客
https://blog.csdn.net/heartdiamond/article/details/6057562

posted @ 2019-05-26 23:20  花生喂龙  阅读(634)  评论(0编辑  收藏  举报