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?
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}}$$
vijaycs
why are we taking here x=NULL?
@mani312 that's generally the case. But in the given question it is said to consider a two logic system by considering comparison with null is false.
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
64.3k questions
77.9k answers
244k comments
80.0k users