Answers for "what are correlated and non correlated subquery"

SQL
0

what are correlated and non correlated subquery

Noncorrelated Subqueries
A noncorrelated subquery executes independently of the outer query. The subquery executes first, and then passes its results to the outer query, For example:

=> SELECT name, street, city, state FROM addresses WHERE state IN (SELECT state FROM states);

Correlated Subqueries
A correlated subquery typically obtains values from its outer query before it executes. When the subquery returns, it passes its results to the outer query.

=> SELECT name, street, city, state FROM addresses
     WHERE EXISTS (SELECT * FROM states WHERE states.state = addresses.state);
Posted by: Guest on November-06-2020

Code answers related to "what are correlated and non correlated subquery"

Code answers related to "SQL"

Browse Popular Code Answers by Language