The null-predicate tests whether a value in a column is null.
Expansion of null-predicate
►►── value-expression ── IS ─┬───────┬─ NULL ─────────────────────────────────►◄ └─ NOT ─┘
Specifies the value to be tested.
Directs CA IDMS to test for the presence of a null value.
Reverses the test. NOT directs CA IDMS to test for the presence of a non-null value.
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:
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.
|
Copyright © 2014 CA.
All rights reserved.
|
|