1.自定义顺序 当我们希望将某个查询结果指定的显示顺序展示的时候 order by case when column1=1 then 0 case when column1=1 then 1 else 2 end decode也可以解决类似 2.对于null值的排序 在Oracle中,进行Order by排序时缺省认为null是最大值,所以如果是ASC升序则被排在最后,而DESC降序则排在最前. a) order by NVL(FIELD, '0') 当field列为null时则指定为0 b)…