Skip Headers
Previous
Previous
 
Next
Next

Group Comparison Conditions

A group comparison condition specifies a comparison with any or all members in a list or subquery.

You can use these comparison operators:

Group Comparison Operators

Operator Description

>

Greater than

>=

Greater than or equal to

<


Less than

<=


Less than or equal to

=


Equal to

!= ^= <>

Not equal to

ANY SOME

Returns true if one or more values in the list match, or false if no values match.

ALL

Returns true if all values in the list match, or false if one or more values do not match.


Syntax

expr
     { = | != | ^= | <> | > | < | >= | <= }
     { ANY | SOME | ALL }
     ({ expression_list | subquery })

Examples

5 <= ALL (5, 10, 15) is true, 5 <> ANY (5, 10, 15) is true.