Table Unions
A table union joins entire tables. There are two options for table unions:
Union
Union All
With the Union option, the system first checks for rows from the primary table, and then for rows with corresponding columns from the secondary table. If the rows from the two tables contain identical data, then only one of the records is retrieved in the union. Unions include rows from the primary table and corresponding columns from the secondary table.
With Union All, the system first checks for rows from the primary table, and then for rows with corresponding columns from the secondary table. Duplicate records are retrieved if the rows from the two tables contain identical data. Because Union All does not scan for distinct records, the retrieval time is faster than when using the Union option.
This diagram illustrates a table union, whether by Union or Union All:
