QuestionQ61

VerifiedUsing Subqueries to Solve Queries

Review this query and its output:

Question Image

Review this query containing an incomplete WHERE clause:

Question Image

Which two statements are true about operators that may be used in the WHERE clause?

Explanation

<> ANY is true when a non-NULL prod_list value differs from at least one value returned by the subquery. Therefore, it returns Plate, Cup, Saucer, and Knife, but not Fork, whose prod_list is NULL. Comparisons involving NULL evaluate to UNKNOWN and do not qualify a row in a WHERE clause. NOT IN is not equivalent to <> ANY; because the subquery includes NULL, NOT IN evaluates to UNKNOWN for values not otherwise matched. Thus, only choice A is correct among the supplied options.

Learn more

Community Discussion

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