Previous Page | Next Page

The SQL Procedure

IN condition


Tests set membership.
Featured in: Joining Two Tables

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

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.

Previous Page | Next Page | Top of Page