| PostgreSQL Reference Manual - Volume 1 - SQL Language Reference by The PostgreSQL Global Development Group Paperback (6"x9"), 716 pages ISBN 0954612027 RRP £32.00 ($49.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
7.16.5 ALL
expression operator ALL (subquery)
The right-hand side is a parenthesized
subquery, which must return exactly one column. The left-hand expression
is evaluated and compared to each row of the subquery result using the
given operator, which must yield a Boolean
result.
The result of ALL is “true” if all rows yield true
(including the special case where the subquery returns no rows).
The result is “false” if any false result is found.
The result is NULL if the comparison does not return false for any row,
and it returns NULL for at least one row.
NOT IN is equivalent to <> ALL.
As with EXISTS, it's unwise to assume that the subquery will
be evaluated completely.
row_constructor operator ALL (subquery)
The left-hand side of this form of ALL is a row constructor,
as described in section 2.2.11 Row Constructors.
The right-hand side is a parenthesized
subquery, which must return exactly as many columns as there are
expressions in the left-hand row. The left-hand expressions are
evaluated and compared row-wise to each row of the subquery result,
using the given operator.
The result of ALL is “true” if the comparison
returns true for all subquery rows (including the special
case where the subquery returns no rows).
The result is “false” if the comparison returns false for any
subquery row.
The result is NULL if the comparison does not return false for any
subquery row, and it returns NULL for at least one row.
See section 7.17.5 Row-wise Comparison for details about the meaning of a row-wise comparison.
| ISBN 0954612027 | PostgreSQL Reference Manual - Volume 1 - SQL Language Reference | See the print edition |