Difference in Oracle null empty string '' is

Explain the meaning:
Q: What is NULL?
A: We do not know what specific time data, i.e. unknown, may be NULL, we call it empty, ORACLE, the table contains a null column length is zero.
ORACLE allows any type of data field is empty, except for the following two cases:
1, the primary key field (Primary Key),
2, have been added to the definition of the field NOT NULL constraints
described:
1, no value is equivalent to , it is unknown.
2, NULL and 0, the empty string, spaces are different.
3, to make null addition, subtraction, multiplication and division arithmetic operations, the result is still empty.
4, NULL process using NVL function.
5, when compared with using the keyword "is null" and "is not null". (For char and varchar2 fields, it '' is null; but where the conditions '' is not null)
6, null values can not be indexed, so some qualified query data may not check out, count (*) treated with nvl (column name, 0) after the investigation.
7, when the sort data is larger than the other (default indexes in ascending order, small → large), the NULL value is always at the bottom.
8, when using AVG, MAX, SUM, COUNT functions such as record NULL are ignored.

 

Reference: https://www.cnblogs.com/wgbs25673578/p/5470437.html , https://www.cnblogs.com/memory4young/p/use-null-empty-space-in-oracle.html

 

Guess you like

Origin www.cnblogs.com/shujk/p/12543904.html