Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2000 | Question 49
  • Last Updated : 15 Oct, 2019

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 < 6, where x is an integer (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

My Personal Notes arrow_drop_up
Recommended Articles
Page :