Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE-CS-2000 | Question 49

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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
Last Updated : 15 Oct, 2019
Like Article
Save Article
Similar Reads