Subqueries
- Last Updated: July 25, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- Apache Cassandra 8.0
- 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 a Select, an Update, or a Delete statement. In the following example, the second Select statement is a subquery:
SELECT * FROM EMP WHERE DEPTNO IN (SELECT DEPTNO FROM
DEPT)