Comparison Operations
The following operations can take operands with multiple data types but always return a Boolean value (sometimes nullable):
Note that the SQL standard mandates IS NULL to return true for a
ROW object where all fields are NULL (similarly, IS NOT NULL is
required to return false). Our compiler diverges from the standard,
returning false for ROW(null) is null.
Comparison operations (=, <>, !=, <, >, <=, >=, <=>,
IS NULL, IS NOT NULL) are defined on all data types, even generic
and recursive data types (including ARRAY, MAP, ROW, VARIANT,
user-defined types). For complex types, comparisons are performed
lexicographically on the type structure. In such comparisons fields
with NULL values are compared smaller than any other value.