Copyright statement: You can reprint it at will, but the original author charlee and original link http://tech.idv2.com/2005/06/03/oracle-null-info/must be identified in a timely manner.
The null value is not equal to 0 or null, indicating that the value is not fixed.
When any operation (addition, subtraction, multiplication, division, string connection, etc.) contains null values, the value of the entire expression is null. Use a single row function to process the null value. The result is also null (except for functions such as nvl ).
However, the Boolean operation result of the null value is not necessarily null, except that false and null are false, true or null are true. This is because in the and operation, if one operation is false, the result is false. Even if the other operation is null, the result must be false. In the or operation, if one operation is true, the result is true.
All grouping functions ignore null values.
During sorting, null is considered as the largest value. In positive order, null is shown at the bottom, and in reverse order, null is displayed at the top.
Functions that process null values include the following:
Nvl (parameter 1, parameter 2): If parameter 1 is not null, parameter 1 is returned. If parameter 1 is null, parameter 2 is returned.
Nvl2 (parameter 1, parameter 2, parameter 3): If parameter 1 is not null, parameter 2 is returned. If parameter 1 is null, parameter 3 is returned. The type of the return value of this function is always the same as that of parameter 2. When parameter 1 is null, Oracle converts parameter 3 to the Data Type of parameter 2 and returns the result.
Nullif (parameter 1, parameter 2): If parameter 1 is equal to parameter 2, null is returned. If parameter 1 is not equal to parameter 2, parameter 1 is returned.
Coalesce (parameter 1, parameter 2,..., parameter n): returns the first non-null value from parameter 1 to parameter n.