Chapter 9

Correlated Subqueries

A correlated subquery is one in which both of the following are true:

image There is a subquery (and hence a main, outer query).

image The information in the subquery is referenced by the outer, main query such that the inner query may be thought of as being executed repeatedly.

In this chapter, we will take a look at correlated subqueries. We will discuss existence queries and correlation as well as NOT EXISTS. We will also take a look at SQL's universal and existential qualifiers. Before discussing correlated subqueries in ...

Get Practical Guide to using SQL in Oracle now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.