September 2004
Beginner to intermediate
388 pages
6h 34m
English
Now that we have seen how two or more tables can be combined in a join query, we turn our attention to another type of complex query known as a subquery. A subquery is a query expression that is nested within another query expression. Its purpose is to have the inner query produce a single value or multiple values that can then be passed into the outer query for processing. You achieve this by embedding a SELECT statement inside a WHERE clause of an outer query’s SELECT statement, INSERT statement, DELETE statement, or HAVING clause.
| Note: | You should avoid nesting more than two subqueries deep because of the conceptual and processing complexities this introduces. |
The typical subquery consists of a (inner) query combined inside ...
Read now
Unlock full access