Stats

462 Contributors: 5 Tuesday, December 20, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap
Download eBook

Subqueries

Download sql eBook

Remarks

Subqueries can appear in different clauses of an outer query, or in the set operation.

They must be enclosed in parentheses (). If the result of the subquery is compared to something else, the number of columns must match. Table aliases are required for subqueries in the FROM clause to name the temporary table.

Related Examples