Add an inclusion test (IN) predicate to an SQL statement
The IN predicate compares a value or values with a collection of
values.
These steps are part of the larger task of adding search conditions to an
SQL statement (WHERE or HAVING clause). When you complete the steps for
adding a simple comparison predicate to an SQL statement, return to
Add search conditions to an SQL statement (WHERE or HAVING clause).
To add an inclusion test (IN) predicate to an SQL
statement:
- In the Operator list, specify the type of test to
perform:
- To return rows whose values match the value or expression specified in the
next step, click IN.
- To return rows whose values do not match the value or expression specified
in the next step, click NOT IN.
- In the Value table, specify values for
comparison. You can:
- Type a value.
- Type a host variable name.
- Optional: Click
to open a window where you can create an expression.
- Optional: Click
to open a window where you can select from a list of unique
value for this column in the current database.
Return to Add search conditions to an SQL
statement (WHERE or HAVING clause)