[NOT] IN

Purpose

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

Syntax

NOT IN Predicate

Example
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);