RefLib

Reference library for AI

Back

postgresql_16:3.6.24.1 IN

PostgreSQL 16 > The SQL Language > Functions and Operators > Row and Array Comparisons > IN

expression IN (value , ...)

The right-hand side is a parenthesized list of expressions. The result is “true” if the left-hand expression's result is equal to any of the right-hand expressions. This is a shorthand notation for *expression* = *value1* OR *expression* = *value2* OR ...

Note that if the left-hand expression yields null, or if there are no equal right-hand values and at least one right-hand expression yields null, the result of the IN construct will be null, not false. This is in accordance with SQL's normal rules for Boolean combinations of null values.

Back