Hologres is compatible with PostgreSQL and allows you to use the standard PostgreSQL syntax to develop data. This topic describes the comparison functions supported by Hologres and their use cases.
The functions supported by Hologres are only a subset of the PostgreSQL functions. For more information about how to use the functions, see Row and Array Comparisons.
Function | Description |
Checks whether the value of an expression is in a value list. | |
Checks whether the value of an expression is not in a value list. |
NOT IN
Checks whether the value of an expression is not in a value list.
expression NOT IN (values,...)Return value
A value of the BOOLEAN type is returned. If the value of the expression is not in the specified value list, t is returned. Otherwise, f is returned.
Example
SELECT 555555 NOT IN (1444444, 155555, 555555);The following result is returned:
?column? ---------- f
IN
Checks whether the value of an expression is in a value list.
expression IN (values,...)Return value
A value of the BOOLEAN type is returned. If the value of the expression is in the specified value list, t is returned. Otherwise, f is returned.
Example
SELECT 555555 IN (1444444, 155555, 555555);The following result is returned:
?column? ---------- t