Comparison operators are used to compare one value or expression to another.
All comparison operators return a boolean result.
Operator | Example | Usage |
= | IF A = B THEN | The equality operator. |
<> | IF A <> B THEN | The inequality operator. |
!= | IF A != B THEN | Another inequality operator, synonymous with <>. |
~= | IF A ~= B THEN | Another inequality operator, synonymous with <>. |
< | IF A < B THEN | The less than operator. |
> | IF A > B THEN | The greater than operator. |
<= | IF A <= B THEN | The less than or equal to operator. |
>= | IF A >= B THEN | The greater than or equal to operator. |
LIKE | IF A LIKE B THEN | The pattern-matching operator. |
BETWEEN | IF A BETWEEN B AND C THEN | Checks to see if a value lies within a specified range of values. |
IN | IF A IN (B,C,D) THEN | Checks to see if a value lies within a specified list of values. |
IS NULL | IF A IS NULL THEN | Checks to see if a value is null. |