List Operators

Depending on your database, may include IN and NOT IN. Use these operators to restrict the data to a set of one or more values.

Table 49. Examples

ExampleDescription

S.CUSTOMERS.STATE IN ('PA', 'IL', 'OH')

Retrieves customers located in Pennsylvania, Illinois, and Ohio.

S.PRODUCTS.DESCRIPTION NOT IN ('Light Bulbs', 'Spark Plugs')

Retrieves all products except for light bulbs and spark plugs.

When you use IN or NOT IN, put each entry in single quotes. If you enter a list of items, separate each item with a comma.