Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-02 |
|
|
View PDF |
A scalar subquery expression is a subquery that returns exactly one column value from one row. The value of the scalar subquery expression is the value of the select list item of the subquery. If the subquery returns 0 rows, then the value of the scalar subquery expression is NULL
. If the subquery returns more than one row, then Oracle returns an error.
You can use a scalar subquery expression in most syntax that calls for an expression (expr
). However, scalar subqueries are not valid expressions in the following places:
RETURNING
clause of DML statementsCHECK
constraintsWHEN
conditions of CASE
expressionsGROUP
BY
and HAVING
clausesSTART
WITH
and CONNECT
BY
clausesCREATE
PROFILE