What is the result if two NULL values are compared to each other?
-
TRUE
-
FALSE
-
UNDEFINED
-
NULL
Reveal answer
Fill a bubble to check yourself
D
Correct answer
Explanation
NULL represents unknown or missing data. Any comparison operation involving NULL (including NULL = NULL) yields NULL, not TRUE or FALSE. This is three-valued logic: TRUE, FALSE, or NULL (unknown). Use IS NULL or IS NOT NULL to test for NULL values.
AI explanation
To answer this question, let's understand how NULL values are handled in comparisons.
When comparing two NULL values in most programming languages and databases, the result is usually NULL. This means that the comparison is inconclusive or unknown.
Therefore, the correct answer is:
D. NULL
This option is correct because when two NULL values are compared to each other, the result is NULL.