Previous Topic: Expansion of Like-predicateNext Topic: Expansion of Quantified-predicate


Expansion of Null-predicate

The null-predicate tests whether a value in a column is null.

Syntax

Expansion of null-predicate

►►── value-expression ── IS ─┬───────┬─ NULL ─────────────────────────────────►◄
                             └─ NOT ─┘
Parameters
value-expression

Specifies the value to be tested.

IS NULL

Directs CA IDMS to test for the presence of a null value.

NOT

Reverses the test. NOT directs CA IDMS to test for the presence of a non-null value.

Usage

Truth Value of a NULL Predicate without NOT

The result of a NULL predicate that does not include NOT is:

Truth Value of a NULL Predicate with NOT

The result of a NULL predicate that includes NOT is:

Example

As the Search Condition in a WHERE Parameter

The following SELECT statement identifies employees for whom no telephone number has been stored in the database:

select emp_id
   from employee
   where phone is null;

Note: For more information about search conditions, see Expansion of Search-condition.