QuestionQ123

VerifiedUsing Subqueries to Solve Queries

Evaluate this SQL statement:

Question Image

Which statement is true about the preceding query if one of the values returned by the subquery is null?

Explanation

IN tests whether a value equals any member returned by the subquery. A comparison to NULL is UNKNOWN, so it cannot match a row; matching against any other non-null returned value still evaluates to true and returns the corresponding rows. This differs from NOT IN, for which a null member can prevent rows from qualifying.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!