Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

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

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :