Effect of null values on Sorting in oracle solution: Method 1: Use nvl function Syntax: Nvl (expr1, expr2) If EXPR1 is NULL, EXPR2 is returned, otherwise, EXPR1. select name, NVL (TO_CHAR (COMM), 'not application') FROM TABLE1 are returned. Once you understand the NVL syntax, you can use it in sorting, for example: order by nvl (FIELD, '0') Method 2: Use other functions, such as decode and case. Method 3: nulls first or nulls last Syntax: Nulls first: records that indicate null values will be ranked first Nulls last: indicates that the record with the null value is placed at the end -- the null value is always placed at the beginning of select * from table order by FIELD asc nulls first -- the null value is always placed at the end of select * from table order by FIELD asc nulls first is compared with the above method, the third method is more convenient.