Skip to main content

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.

OperatorSyntaxDescription
<a < ba is less than b.
>a > ba is greater than b.
<=a <= ba is less than or equal to b.
>=a >= ba is greater than or equal to b.
=a = ba equal to b.
<>a <> ba is not equal to b.
!=a != ba 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.

PredicateSyntaxDescription
BETWEENa BETWEEN x AND ya is equal to or greater than x and less than or equal to y.
NOT BETWEENa NOT BETWEEN x AND ya is less than x or is larger than y.
IS DISTINCT FROMa IS DISTINCT FROM ba is not equal to b. null is treated as an ordinary value.
IS NOT DISTINCT FROMa IS NOT DISTINCT FROM ba is equal to b. null is treated as an ordinary value.
IS NULLa IS NULLa is null.
IS NOT NULLa IS NOT NULLa is not null.

Limitations

Extreme DPS has some limitations on input types of comparison predicates:

  • The input types of BETWEEN, NOT BETWEEN, IS NULL, and IS NOT NULL cannot be interval.
  • The input types of IS DISTINCT FROM and IS NOT DISTINCT FROM cannot be interval.