PostgreSQL SyntaxLesson 40Free preview
PostgreSQL ANY
This lesson is part of PostgreSQL · All levels
Summary
ANY operator compares a value against a set of subquery results on the condition that at least one value comparison is true. Form = ANY is equal to IN, whereas > ANY means greater than the smallest value of the resulting subquery. The combination of the operator with ANY opens up a way to write the conditions more expressively.
Key points
- ANY satisfies the condition that at least one subquery result matches.
- = ANY is logically equivalent to the IN operator.
- > ANY means greater than the smallest value of the subquery.
- It can be combined with various comparison operators.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.