Compatible with PostgreSQL, Hologres allows you to use standard PostgreSQL syntax for data development.

The following table describes the subquery functions supported by Hologres. The functions supported by Hologres are only a subset of the PostgreSQL functions. For more information about how to use these functions, see Subquery Expressions in the PostgreSQL documentation.
Function Description
EXISTS (subquery) Checks whether a subquery returns rows.
  • If at least one row is returned, this function returns TRUE.
  • If no row is returned, this function returns FALSE.
Note A subquery is a SELECT statement.
IN (subquery) Compares the values of an expression with the result returned by a subquery row by row.
  • If a value of the expression is a member of the result returned by the subquery, this function returns TRUE.
  • If a value of the expression is not a member of the result returned by the subquery, this function returns FALSE.
Note The number of values to which the expression evaluates each time must be the same as the number of columns in the result returned by the subquery.
NOT IN (subquery) Compares the values of an expression with the result returned by a subquery row by row.
  • If a value of the expression is not a member of the result returned by the subquery, this function returns TRUE.
  • If a value of the expression is a member of the result returned by the subquery, this function returns FALSE.
Note The number of values to which the expression evaluates each time must be the same as the number of columns in the result returned by the subquery.
ANY (subquery) Compares the values of an expression with the result returned by a subquery row by row by using a specified operator.
  • If one or more operations return TRUE, this function returns TRUE.
  • If all operations return FALSE, this function returns FALSE.
Note The number of values to which the expression evaluates each time must be the same as the number of columns in the result returned by the subquery.
SOME (subquery) N/A