Previous Topic: IN PredicateNext Topic: Search Conditions


NULL Predicate

Use the NULL predicate to test for null values. Following is the syntax diagram for the NULL predicate:

►►─ column-name ─ IS ─┬───────┬─ NULL ────────────────────────────────────────►◄
                      └─ NOT ─┘

Description

column-name

Specify the name of a column in a table or view.

IS NULL

Indicates to test the value of the column to determine if it is null.

NOT

A keyword. Use NOT to specify that the value of the column be tested to determine if it is not null.

The result of a NULL predicate cannot be unknown. If the value of the column is null, the result is true. If the value is not null, the result is false. If NOT is specified, the result is reversed.

Example

The following NULL predicate is true only if the value of PHONENO is null. If the value of PHONENO is not null, the result of the predicate is false.

 PHONENO IS NULL