Machine-translated by Google. Questions are authored in English.
Top

Discussion

How can you find rows that do not match some specified condition?

  • A.
    EXISTS
  • B.Double use of NOT EXISTS
  • C.NOT EXISTS
  • D.None of the above is correct.

Answer: B

Correct answer: Double use of NOT EXISTS

A single NOT EXISTS finds rows for which no matching row exists, which is not the same as rows failing to match a condition across a set. The classic relational division problem - find the rows that match every member of a set - is expressed as a doubly nested NOT EXISTS: there is no member of the set for which there is no matching row. It is awkward to read and is the standard idiom for the purpose.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.