88 88 votes 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?$x = 5 \quad not (not (x = 5))$$x = 5 \quad x > 4$ and $x < 6,$ where $x$ is an integer$x ≠ 5 \quad not (x = 5)$none of the above Databases gatecse-2000 databases sql normal + – Kathleen 28.4k views answer comment Share Follow Print See all 7 Comments 7 7 Comments reply Show 4 previous comments Chandrabhan Vishwa 1 commented Feb 14, 2024 reply Follow flag in this question = is equivalent to assignment operator and this == is comparision based operator 0 0 replyShare Deepak Poonia commented Jul 22, 2024 i edited by Deepak Poonia Aug 6, 2024 reply Follow flag Detailed Video Solution, with Complete Analysis & Variations: https://youtu.be/zb6vXpZVo1E?t=12&feature=shared (MUST WATCH) 13 13 replyShare Patel_And_Patel commented Dec 19, 2025 reply Follow flag very nice explnation @Deepak Poonia sir 0 0 replyShare Please log in or register to add a comment.
Best answer 91 91 votes Answer is option C. $${\begin{array}{|c|cc|cc|cc|}\hline\\ \textbf{Value at hand}& \textbf{Option A}& & \textbf{Option B}& &\textbf{Option C} \\\hline 6 & \times & \times & \times & \times & \checkmark & \checkmark \\ \hline 5 & \checkmark & \checkmark & \checkmark & \checkmark &\times & \times \\ \hline \text{NULL}& \times & \times & \times & \times &\color{blue} \times & \color{blue}\checkmark \\ \hline \end{array}}$$ amarVashishth answered Dec 23, 2015 • edited Apr 15, 2019 by ajaysoni1924 amarVashishth comment Share Follow See all 13 Comments 13 13 Comments reply Show 10 previous comments SravaniNaidu commented Sep 2, 2024 reply Follow flag Nice question with good explanation, thank you sir 1 1 replyShare Sandip_Pal commented Sep 21, 2024 reply Follow flag Sir nice question with very good explanation tahnk you sir 0 0 replyShare jenilS7 commented Dec 12, 2024 reply Follow flag Not(unknown) should be unknown Right? 1 1 replyShare Please log in or register to add a comment.
45 45 votes Answer: C As (null) != 5 gives false. But, not((null) = 5) gives not(false) gives true. Aravind answered Sep 25, 2014 • edited May 19, 2015 by Rajarshi Sarkar Aravind comment Share Follow See all 3 Comments 3 3 Comments reply Rupjit Chakraborty commented Oct 11, 2014 reply Follow flag option (b) NULL=5 False x>4 and x<6 where x is an integer Please explain how this evaluates to false 0 0 replyShare Aravind commented Oct 13, 2014 reply Follow flag in all the options, will be evaluating the pair of equations with same value of x(whether it is null or an integer) in option 'b' x is always an integer, so whatever value of x u put both x=5 and x>4 and x<6 will always give the same answer 6 6 replyShare Rupjit Chakraborty commented Nov 6, 2014 reply Follow flag Yes. THANKS 0 0 replyShare Please log in or register to add a comment.
42 42 votes a.null = 5 => false , not(not(null=5)) = not(not(false)) = not(true) = false b. null = 5 => false , null>4 and null <6 = False and false = false c.null ≠ 5 => false not(null= 5)= not (false) = true ∴ option C is not eqivivalent heena singh answered Nov 29, 2017 heena singh comment Share Follow 0 reply Please log in or register to add a comment.
2 2 votes 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. ans-C Shailendra_ answered Nov 10, 2019 Shailendra_ comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote SQL definition= Comparison with null value = UnknownGiven in Question = Comparison with null value = False Take x= Null in every option a- Null=5, not(not(x=5)) False not(not(False)) ---------> True Not(true) Falseb- Null=5 null>4 and null<6 ---------> True False False C- Null/=5 not(null=5) False not(false) ---------> Flase True akshay_123 answered Aug 22, 2025 akshay_123 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes https://youtu.be/zb6vXpZVo1E?t=12&feature=shared TirthNandha answered Dec 9, 2024 TirthNandha comment Share Follow 0 reply Please log in or register to add a comment.