What is the difference between a "scalar subquery" and a "correlated subquery"?
Correct! Well done.
Incorrect.
The correct answer is B) A scalar subquery returns a single value and can be evaluated independently of the outer query, while a correlated subquery references columns from the outer query and is conceptually re-evaluated for each row of the outer query
Correct Answer
A scalar subquery returns a single value and can be evaluated independently of the outer query, while a correlated subquery references columns from the outer query and is conceptually re-evaluated for each row of the outer query
A scalar subquery is self-contained and returns one value usable as an expression; a correlated subquery depends on the current row of the outer query (referencing its columns), conceptually executing once per outer row, though optimizers often rewrite these into joins for efficiency.