Subquery
- The inner query is executed only once.
- The inner query will get executed first and the output of the inner query used by the outer query.
- The inner query is not dependent on outer query.
Correlated SubQuery
- The outer query will get executed first and for every row of outer query, inner query will get executed.
- So the inner query will get executed as many times as number of rows in result of the outer query.
- The outer query output can use the inner query output for comparison. This means inner query and outer query dependent on each other.