Comparison functions

更新时间:
复制 MD 格式

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.

Note

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

IN

Checks whether the value of an expression is in a value list.

NOT IN

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