Correlated Subqueries When Providing Comparison Values
In the search condition of a subquery, when you refer to columns of any table or view defined
in an outer query, the reference is called an outer reference. A subquery containing an outer
reference is called a correlated subquery.
If you refer to a column name that occurs in more than one outer query, you must qualify the
column name with the correlation name of the table or view to which it belongs. Similarly, if you
refer to a column name that occurs in the subquery and in one or more outer queries, you must
qualify the column name with the correlation name of the table or view to which it belongs. The
correlation name is known to other subqueries at the same level, or to inner queries but not to
outer queries.
If you use the same correlation name at different levels of nesting, an inner query uses the one
from the nearest outer level.
Subquery
251