IN Condition

Tests set membership.

Joining Two Tables

Syntax

sql-expression <NOT> IN (query-expression | constant <, … constant>)

Required Arguments

constant

is a number or a quoted character string (or other special notation) that indicates a fixed value. Constants are also called literals.

query-expression

is described in query-expression.

sql-expression

is described in sql-expression.

Details

An IN condition tests if the column value that is returned by the SQL expression on the left is a member of the set (of constants or values returned by the query expression) on the right. The IN condition is true if the value of the left-hand operand is in the set of values that are defined by the right-hand operand.