Database Reference
In-Depth Information
Sub-Query (also known as Nested Query)
Query inside another query is called a Sub-Query. Sub-Queries
are mostly used in the WHERE clause but you can use them in
the FROM or even in the SELECT clause. The important thing is
to understand the technique, how to interpret such queries or in
other words how Oracle instance will interpret such queries.
The technique is, start from the bottom query first or the one
within parenthesis, imagine what's the output will be, replace
that query with its imagined output and move to the next higher
one. Keep on doing this unless you end up with the main query.
Figure 2-8: Query inside another query or Sub queries. Technique for
Sub-Query Interpretation: Start from the bottom query first, imagine
what its output is would be, replace that query with its imagined output
and move to the next higher one.
 
Search WWH ::




Custom Search