IN predicate

The IN predicate compares a value or values with a set of values.

The IN predicate is supported only for Java™ application programs.

Read syntax diagramSkip visual syntax diagramcolumnaliasNOTIN(,literal)
column
Read syntax diagramSkip visual syntax diagramschema-name.table-name.column-name1
Notes:
  • 1 You can have the same column name in multiple tables, but if the table is not qualified, each table must be searched for the column.

The IN predicate is equivalent to the quantified predicate as follows:

Table 1. IN predicate and equivalent quantified predicates
IN predicate Equivalent quantified predicate
column1 IN (value1, value2, valuen)

column1 = value1 or
column1 = value2 or
column1 = valuen

column1 NOT IN (value1, value2, valuen)

column1 <> value1 and
column1 <> value2 and
column1 <> valuen

Example: The following predicate is true for any row whose employee is in department D11, B01, or C01.

  WORKDEPT IN ('D11', 'B01', 'C01')