Subqueries
- Last Updated: May 12, 2026
- 1 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
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)