When we do not know the specific data, it is unknown. We can use null. We call it null. The column length of a table containing null values in Oracle is zero.
Oracle allows null data types. In addition to the primary key field pk, the restriction condition field not null has been added during the definition.
Note:
It is equivalent to no value, which is unknown.
Null and 0, empty strings, and spaces are different.
The operation result of adding, subtracting, multiplication, and Division null values is null.
The nvl function can be used to process null values.
Use is null and is not null for comparison.
NULL values cannot be indexed. Therefore, some qualified data may not be available during the query.
In count (*), use nvl for processing and then query. Nvl (column name, 0)
Sorting is larger than other data (index sorting by default is descending, small to large), so null is at the end
Select 1 from dual where null = null; row not selected
No records found
Select 1 from dual where null = ''; row not selected
No records found
Select 1 from dual wehre ''=''; row not selected
No records found
Select 1 from dual where null is null; row not selected
No records found
The result of the addition, subtraction, multiplication, and division operation on null values is still null.
Select 1 + null from dual;
Select 1-null from dual;
Select 1 * null from dual;
Select 1/null from dual;
A record is queried, which is the null value in the SQL statement.
Oracle null usage. null is null, Which is incomparable with other types.