I’d like to know what does this operator do, I coundn’t find anything about it.
It would be nice to see some examples of usage.
set ansi_nulls [on | off]
expression !> expression (NULL)
For example: these queries return the same result (1):
select 1 where 1 !> 1;
select 1 where 1 = 1;
But nothing is returned from these queries:
set ansi_nulls off;
select 1 where null !> null;
set ansi_nulls on;
select 1 where null !> null;
Its stating “Not greater than“.
For example:
This query will
PRINT“foo”, because 1 is not greater than 2.1 is not greater than 1, therefore this returns
true.Also 1 equals 1, so this will also return
true.Hence why both your statements return the same results.
Nothing will be returned when comparing
nullbecause these do not have a value. (ie.null != null). So the statement will never betrue