Comparison Operators
Comparison operators are available for all data types where comparison makes sense. All comparison operators are binary operators that return values of true, false, or NULL.
Operator | Description | Binary function |
---|---|---|
<
|
less than |
binary_lt
|
>
|
greater than |
binary_gt
|
<=
|
less than or equal to |
binary_le
|
>=
|
greater than or equal to |
binary_ge
|
=
<=>
|
equal |
binary_eq
|
!=
<>
|
not equal (use in predicate subqueries not supported) |
binary_ne
|
NULL Handling
Comparison operators return NULL if either or both operands are null. One exception applies: <=>
returns true if both operands are NULL, and false if one operand is NULL.