Correlated Sub Queries.

Unlike the normal Subqueries, the Correlated Subqueries can also be defined as Inner Query embedded in an Outer Query.

But the main difference between Correlated and Uncorrelated or normal Subquery is –

Correlated Subquery Uncorrelated Subquery
Inner Query cannot execute independently of the outer query i.e. it is dependent on Outer query for its execution Inner Query can execute independently of the outer query i.e. it is not dependent on Outer query for its execution
In this Outer Query is executed first , Inner query execution depends upon results of outer query./td>

In this Inner Query is executed first, Outer query depends upon the resultset of outer query .

 

Shikha Katariya

Shikha

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *