Use a WHERE clause to find a subset of values
Like Exclude rows,
the following query assumes the use of an ANSI-compliant database.
The owner qualifier is in quotation marks to preserve the case sensitivity
of the literal string.
Each statement in the query retrieves rows that include
the subset of
AZ
or NJ
in the state column
of the Aleta.customer table. You cannot test TEXT or BYTE columns with the IN keyword.
Also, when you use , you cannot test BLOB or CLOB columns with the IN keyword.
In the example of a query on an ANSI-compliant database,
no quotation marks exist around the table owner name. Whereas the
two statements in Query searched
the Aleta.customer table, the following query searches
the table ALETA.customer, which is a different table, because
of the way ANSI-compliant databases look at owner names.
The previous query adds the keywords NOT IN, so the subset
changes to exclude the subsets
AZ
and NJ
in
the state column. The following figure shows the results in
order of the state column.