IN

Syntax

item [ NOT ] IN (<list>)

Description

Checks whether the value matches at least one of the values listed in IN(...).

The option item NOT IN (<list>) returns the opposite value.

Argument types:

  • itemArray of fractional numbers | Array of integers | Array of strings | Boolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUID
  • listArray of fractional numbers | Array of integers | Array of strings | Boolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUID

Return type: Boolean

Examples

3 IN (23, 5, 3, 67) = TRUE
3 NOT IN (23, 5, 3, 67) = FALSE

Data source support

ClickHouse 21.8, Yandex Metrica, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, YDB.