skip to main content
Expressions, conditions, and queries : Subqueries
 

Subqueries

A query is an operation that retrieves data from one or more tables or views. In this reference, a top-level query is called a SELECT statement, and a query nested within a SELECT statement is called a subquery.
A subquery is a query expression that appears in the body of another expression such as SELECT statement, an UPDATE, or a DELETE statement.
SELECT * FROM emp WHERE deptno IN
(SELECT deptno FROM dept)