This tests whether an expression is contained in a result set.
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));
Please let us know how we can improve.
If there's anything we can improve on, let us know.
To help us understand your feedback, please include a link to this page.