The UNION keyword is used for integrating queries:
< query 1 >
UNION[ALL]
< query 2 >
The UNION clausecombines the results of two SELECT statements into a single result set. If the ALL parameter is given, all the duplicates of the rows returned are retained; otherwise the result set includes only unique rows. Note that any number of queries may be combined. Moreover, the union order can be changed with parentheses.
The following conditions should be observed:
The number of columns of each query must be the same;
Result set columns of each query must be compared by the data type to each other (as they follows);
The result set uses the column names from the first query;
The ORDER BY clause is applied to the union result, so it may only be written at the end of the combined query.
Example 5.7.1
Find the model numbers and prices of the PCs and laptops: