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:
item—Array of fractional numbers | Array of integers | Array of strings | Boolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUIDlist—Array 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, Files, Google Sheets, Yandex Metrica, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, Yandex Documents, YDB.