Difference between nested query,sub query and nested query?

What is difference between nested query,sub query and nested query? explain clearly with an example?

Questions by pvsp.indian   answers by pvsp.indian

Editorial / Best Answer

arpitapatel  

  • Member Since Sep-2008 | Sep 24th, 2008


Query inside the query is nested query.
It is also called as sub query.
Correlated subquery runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query.

Nested subquery runs only once for the entire nesting (outer) query. It does not contain any reference to the outer query row.

Showing Answers 1 - 9 of 9 Answers

arpitapatel

  • Sep 24th, 2008
 

Query inside the query is nested query.

It is also called as sub query.

Correlated subquery runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query.

Nested subquery runs only once for the entire nesting (outer) query. It does not contain any reference to the outer query row.

katgeektalk

  • Aug 22nd, 2010
 

The subquerry is often reffered to as a nested SELECT, sub-SELECT, or inner SELECT statement.
The subquery generally excuted first, and its output is used to complete the query condition for the main (or outer) query.

  Was this answer useful?  Yes

rams

  • Apr 3rd, 2012
 

Both are same

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions