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

Discussion

There is an equivalent join expression that can be substituted for all subquery expressions.

  • A.True
  • B.False

Answer: B

Correct answer: False

Some subqueries have no join equivalent. A correlated NOT EXISTS, or a comparison against an aggregate of a related set such as WHERE salary > (SELECT AVG(salary) FROM emp), cannot be expressed as a join.

The reason is structural: a join produces rows by combining them, whereas a subquery can return a single computed value or merely test whether any row exists. Many subqueries can be rewritten as joins, and doing so sometimes helps the optimiser - but the statement claims all of them can, and that is what makes it false.

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

Post your comment

Please log in or register to post a comment.