Comparison Functions and Operators
Comparison functions and operators produce a Boolean value or null (unknown) on two expressions.
Comparison operators
The following table lists the comparison operators supported by Extreme DPS.
| Operator | Syntax | Description |
|---|---|---|
< | a < b | a is less than b. |
> | a > b | a is greater than b. |
<= | a <= b | a is less than or equal to b. |
>= | a >= b | a is greater than or equal to b. |
= | a = b | a equal to b. |
<> | a <> b | a is not equal to b. |
!= | a != b | a is not equal to b. |
Limitations
In Extreme DPS, the input types of comparison operators <, >, <=, and >= cannot be interval.
Comparison predicates
The following table lists the comparison predicates supported by Extreme DPS.
| Predicate | Syntax | Description |
|---|---|---|
BETWEEN | a BETWEEN x AND y | a is equal to or greater than x and less than or equal to y. |
NOT BETWEEN | a NOT BETWEEN x AND y | a is less than x or is larger than y. |
IS DISTINCT FROM | a IS DISTINCT FROM b | a is not equal to b. null is treated as an ordinary value. |
IS NOT DISTINCT FROM | a IS NOT DISTINCT FROM b | a is equal to b. null is treated as an ordinary value. |
IS NULL | a IS NULL | a is null. |
IS NOT NULL | a IS NOT NULL | a is not null. |
Limitations
Extreme DPS has some limitations on input types of comparison predicates:
- The input types of
BETWEEN,NOT BETWEEN,IS NULL, andIS NOT NULLcannot beinterval. - The input types of
IS DISTINCT FROMandIS NOT DISTINCT FROMcannot beinterval.