IN Operator

Restriction: This topic applies to Windows environments only.

The IN (and NOT IN) operators cause an enumerated list of values appearing in the WHERE clause predicate to be evaluated for a true condition.

SELECT sno, sname
  FROM supplier
  WHERE sno IN ("S1", "S2", "S3")

All data values in the SNO column must match one of the three string constants in order for their corresponding records to be retrieved. This query retrieves the following data values:

sno sname
S1 SMITH
S2 JONES
S3 BLAKE