UNION

SQL: SELECT: Joins and Sets

Unions return all distinct values from both data sets with no duplicates. Example:

//Get a list of unique restaurants from both north and south malls.

SELECT store FROM mall_south WHERE type = "restaurant"
    UNION 
SELECT store FROM mall_north WHERE type = "restaurant";

//Get a list of unique classes taught in two schools. Order them by their class name.

SELECT evening_class FROM school_1 
    UNION 
SELECT evening_class FROM school_2
    ORDER BY evening_class ASC;