Union: Append Like Datasets
A Union clause appends rows from both subqueries into the result. The results of both subqueries must have identical columns and datatypes.
The following example merges a list of congress persons from Alaska or California with a list of female congress persons:
This example also illustrates an additional point. Duplicate rows are removed by default with Union (equivalent to using the Distinct keyword). So in this example, the female congress person from Alaska only appears once even though she is present in the results of both subqueries.
You can use the ALL keyword to keep duplicate rows if desired.