skip to main content
Reference : Supported SQL Statements and Extensions : Subqueries
  

Try DataDirect Drivers Now

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 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)
* IN Predicate
* EXISTS Predicate
* UNIQUE Predicate
* Correlated Subqueries