Firebird 2.0
PSQL Reference
Manual

IS DISTINCT FROM CONDITION

Pupose

Use the IS DISTINCT FROM predicate to test if a value is identical to another value.

Syntax

<null_predicate ::=
   <psql_expr> IS [NOT] DISTINCT FROM <psql_expr>


Semantics

The IS DISTINCT FROM tests if two values are identical, either because both are known (i.e. not NULL) and the same, or because both are unknown.

Examples

At the end of the following routine variable 'a' will have value 3, not value 4:

DECLARE a INTEGER;
BEGIN
   IF (a IS NOT DISTINCT FROM NULL) THEN
      a = 3;
   IF (a IS DISTINCT FROM 3) THEN
      a = 4;
   IF (a IS NULL) THEN
      a = 4;
END


See also

IS NULL


previous page goto index next page

Legal information