我們在使用排序 order by 的時候,如果使asc排序,發現null值的數據總會排在最前面。
解決辦法:使用 is null,在需要null值排在後面的字段前加上"該字段名 is null,"
例如: order by sort asc 改寫成 order by sort is null, sort asc
order by name asc, sort asc 改寫成 order by name asc, sort is null, sort asc
oracle https://www.cnblogs.com/anlove0328-1121/p/5481383.html
參考:https://blog.csdn.net/layman1024/article/details/79257756