Skip to main content

CONTAINS

Checks if the array contains a specific element.

Syntax

CONTAINS( <array>, <element> )

Aliases

Examples

SELECT ARRAY_CONTAINS([1, 2], 1), CONTAINS([1, 2], 1);

┌─────────────────────────────────────────────────┐
│ array_contains([1, 2], 1)contains([1, 2], 1)
├───────────────────────────┼─────────────────────┤
truetrue
└─────────────────────────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today