Why this is returning a record in EXASOL DBMS
SELECT a, b FROM (SELECT NULL AS a, 'b' AS b) t
WHERE (a, b) NOT IN (SELECT NULL, 'b')
?
Thanks, Rafael.
Why this is returning a record in EXASOL DBMS
SELECT a, b FROM (SELECT NULL AS a, 'b' AS b) t
WHERE (a, b) NOT IN (SELECT NULL, 'b')
?
Thanks, Rafael.
Copyright © 2021 Jogjafile Inc.
Because
(NULL = NULL) <> TrueResult:
So, comparing anything to NULL results in NULL, not True or False.
In your case, you are comparing tuples, not scalars. For tuples it is even worse: if any element of one of the tuples is NULL, the comparison result is neither True nor False.