IN Condition

The IN condition is satisfied when the expression to the left of the keyword IN is included in the list of items.
(1)
IN Condition

1  %Expression1?  NOT  IN
1  (
2.1+ ,
2.1  %Literal Number2
2.1  %Literal
DATETIME3
2.1  %Quoted String4
2.1  %Literal
INTERVAL5
2.1 USER
2.1 CURRENT_USER
2.1 TODAY
2.1  CURRENT?  %DATETIME Field Qualifier6
2.1 SITENAME
2.1 DBSERVERNAME
2.1   %Literal Row6
1 )
2.1  collection_col
2.1  ( + , %Literal Collection7 )
2.1  %Literal Collection7
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.