Skip to main content

[ NOT ] IN

Checks whether a value is (or is not) in an explicit list.

Syntax​

<value> [ NOT ] IN (<value1>, <value2> ...)

Examples​

SELECT 1 NOT IN (2, 3);

┌────────────────┐
│ 1 not in(2, 3) │
├────────────────┤
│ true │
└────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today