A subquery is a SELECT statement with another SELECT inside it. It looks like this:
SELECT ... /* outer or parent query */ (SELECT ...) /* subquery, inner query or subselect */ ...
There are three possible plans to process a subquery:
When processing is out-to-in, the outer query is the driver. When processing is in-to-out, the inner query is the driver.
Table 6-1 shows the SQL Standard requirements and the level of support the Big Eight have for subqueries.
Notes on Table 6-1:
Table 6-1. ANSI/DBMS Subquery Support