[NOT] IN

Purpose

This tests whether an expression is contained in a result set.

Syntax

NOT IN Predicate

Examples
CREATE TABLE t (x DECIMAL);
INSERT INTO t VALUES 1,2,3,4;

SELECT x FROM t WHERE x IN (2,4);
CREATE TABLE t2 (y DECIMAL);
INSERT INTO t2 VALUES 2,4;

SELECT x FROM t WHERE x IN (SELECT y FROM t2);
CREATE TABLE t3(x DECIMAL, y DECIMAL, z VARCHAR(100));
INSERT INTO t3 VALUES ((1, 2, 'a'), (3, 4, 'b'), (5, 6, 'c'));

SELECT * FROM t3 WHERE (x, y) in ((1, 2), (5, 6));