1.

Distinguish between nested subquery, correlated subquery, and join operation.

Answer»


  • Join Operation: A join operation is a binary operation that combines the data or rows from two or more tables based on a field they have in common. There are different types of joins, such as INNER JOIN, FULL JOIN, LEFT JOIN, RIGHT JOIN, etc.


  • Subquery: A query can be enclosed within another query, so the outer query is called the main query, and the inner query is called a subquery.


    • Nested Query: Nested queries execute the inner query first, and only once. An outer query is then executed based on the results of the inner query. The inner query is therefore used to execute the outer query.


    • Correlated Query: The outer query is executed first, and for every row of the outer query, the inner query is executed. Thus, values from the outer query are used in the inner query.






Discussion

No Comment Found