(Contents)(Previous)(Next)

Values in a Set: IN (x,y,z)

If the number of possible values is small, so that it is easy to list them, they can be combined to form a set using parentheses and placing the IN operator before them.

The order of the values within the parentheses is not relevant.

Selection of all customers who are not companies:

SELECT title, firstname, name, city

FROM customer

WHERE title IN ('Mr','Mrs')


(Contents)(Previous)(Next)