Open In App

GATE | GATE-CS-2000 | Question 49

In SQL, relations can contain null values, and comparisons with null values are treated as unknown. Suppose all comparisons with a null value are treated as false. Which of the following pairs is not equivalent?
(A) x = 5 AND not(not(x = 5))
(B) x = 5 AND x> 4 and x (C) x ≠ 5 AND not (x = 5)
(D) None of the above

Answer: (C)
Explanation: According to given question, comparison with NULL value always False, so “x ≠ 5” will be false. “x = 5” will also false and not (x = 5) = not(false) = true.
Hence, these are not equivalent pair.

Option (C) is true.
Quiz of this Question

Article Tags :