Sql Excel : IN

The IN statement is used in a WHERE clause to choose items from a set. The
following WHERE clause chooses zip codes in New England states:
WHERE stab IN (‘VT’, ‘NH’, ‘ME’, ‘MA’, ‘CT’, ‘RI’)
This use is equivalent to the following:
WHERE (stab = ‘VT’ OR
stab = ‘NH’ OR
stab = ‘ME’ OR
stab = ‘MA’ OR
stab = ‘CT’ OR
stab = ‘RI’)
The IN statement is easier to read and easier to modify.
Similarly, the following NOT IN statement would choose zip codes that are not in
New England:
WHERE stab NOT IN (‘VT’, ‘NH’, ‘ME’, ‘MA’, ‘CT’, ‘RI’)
This use of the IN statement is simply a convenient shorthand for what would
otherwise be complicated WHERE clauses. The section on subqueries explores
another use of IN.