What is the result if two NULL values are compared to each other?
-
TRUE
-
FALSE
-
UNDEFINED
-
NULL
In SQL and PL/SQL, any comparison involving NULL values (including NULL = NULL) returns NULL (or UNKNOWN), not TRUE or FALSE. This is because NULL represents an unknown value, and you cannot determine whether two unknown values are equal. NULL requires special handling with IS NULL or IS NOT NULL operators.
SQL uses three-valued logic (TRUE, FALSE, UNKNOWN/NULL) for comparisons involving NULL. NULL represents "unknown value," so comparing two unknowns (NULL = NULL) cannot be resolved to TRUE or FALSE — the result is NULL (displayed as UNKNOWN in some contexts, but the comparison operator itself evaluates to NULL). "TRUE" and "FALSE" are wrong because NULL never satisfies a definite boolean outcome in a direct comparison. "UNDEFINED" isn't the SQL term used — SQL's own terminology and return value for this case is NULL, which is why it's the correct choice here (this is why IS NULL exists instead of = NULL).