DEV Community

AntDB
AntDB

Posted on

AntDB-Oracle Compatibility Developer's Manual P3–79

ALL

To the right of the operator is the subquery in parentheses, which must return the contents of only one column. We compute the expression on the left side of the operator, and then use the given operator to compare it with each row of the subquery result, resulting in a result of type BOOLEAN. If the comparison with all rows is true (including the special case where the subquery returns no rows), then the result of the ALL operation is "true". The result of the ALL operation is "false" if any record is found with a "false" comparison result. If the compare operation does not return "false" for any record and returns null for at least one record, then the final result is "null".

expression operator ALL (subquery)

NOT IN is equivalent to '<> ALL'.

As with EXISTS, it is not wise to assume that the subquery will complete the query for all rows involved.

Top comments (0)