oracle
排序 对于null 的排序处理 nulls LAST nulls FIRST
select t.*
from tbl_prte_pl t
order by t.PERCEILE nulls FIRST , t.DR_SE DESC nulls LAST , t.updated_time desc ,t.ADD_TIME desc
mysql
1.将null强制放在最前:
if(isnull(字段名),0,1) asc //asc可以省略
2.将null强制放在最后
if(isnull(字段名),0,1) dsc
if(isnull(字段名),1,0) asc //asc可以省略
select * from tbl_cial_excel t
order by if(isnull(exceld_id),1,0) desc;