Entering content frame

Subquery 

A subquery specifies a result table (see result table name) that can be used in certain predicates and for updating column values.

Syntax

<subquery> ::= (<query_expression>)

query_expression

Explanation

Subqueries can be used in a SET UPDATE condition of an UPDATE statement. In this case, the subquery must produce a result table that contains a maximum of one row.

Subqueries can be used in an INSERT statement (INSERT statement)).

Subqueries can be used in the following predicates:

Comparison predicate
EXISTS predicate
IN predicate
Quantified predicate

See also:

Scalar Subquery

Correlated Subquery

Leaving content frame