IN Condition
The IN condition is satisfied when the expression to the left of
the keyword IN is included in the list of items.
Element | Description | Restrictions | Syntax |
---|---|---|---|
collection_col | Name of a collection column that is used in an IN condition | The column must exist in the specified table | Identifier |
If you specify the NOT operator, the IN condition is TRUE
when
the expression is not in the list of items. NULL values do not satisfy
the IN condition.
The following examples show some IN conditions:
WHERE state IN ('CA', 'WA', 'OR') WHERE manu_code IN ('HRO', 'HSK') WHERE user_id NOT IN (USER) WHERE order_date NOT IN (TODAY)
In , the built-in TODAY function is evaluated at execution time. The built-in CURRENT function is evaluated when a cursor opens or when the query executes, if it is a singleton SELECT statement.
The built-in USER function is case sensitive; for example, it interprets minnie and Minnie as different values.