UNION is an operator used to combine two or more SELECT statements and generate one result set. These SELECT statements must meet some conditions, such as the following:
They must have the same number of columns. You can work around this restriction if you use constants in the SELECT statement with fewer columns, as shown in Listing 5.21.
-- A constant has to be used in the second SELECT statement -- because Shippers doesn't have a contactname column USE Northwind SELECT companyname, contactname FROM Suppliers WHERE country = 'USA' UNION SELECT ...