March 2009
Intermediate to advanced
832 pages
23h 49m
English
Subqueries can be characterized in two main ways. One is by the expected number of values (either scalar or multivalued), and another is by the subquery’s dependency on the outer query (either self-contained or correlated). Both scalar and multivalued subqueries can be either self-contained or correlated.
As mentioned, a self-contained subquery is a subquery that can be run independently of the outer query. Self-contained subqueries are very convenient to debug, of course, compared to correlated subqueries.
Scalar subqueries can appear anywhere in the query where an expression resulting in a scalar value is expected, while multivalued subqueries can appear anywhere in the query where a collection of multiple values ...