`any` and `all` special Postgres constructs
To determine if a value exists in a subquery or scalar value list you can use
the `in` operator like:
``` sql
> select 1 in (1, 2)
true
```
`any` and `all` go a step further by allowing for an operator in the special
construct which is used against each value in the subquery or array (no scalar
value list for these constructs).
`any` examples:
``` sql
> select 1 = any(Array[1, 2, 3])
true
> select 1 > any(Array[1, 2, 3])
false
```
`all` examples
``` sql
> select 17 <> any(Array[2, 4, 8])
true
> select 17 < any(Array[2, 4, 8])
false
```
`some` is a synonym for any.
chriserin
June 1, 2017