Hi
The Sql UNION operation creates a union query, which combines the results of two or more independent queries or tables.
[TABLE] query1 UNION [ALL] [TABLE] query2 [UNION [ALL] [TABLE] queryn [ ... ]]
where query1~n is a SELECT statement, the name of a stored query, or the name of a stored table preceded by the TABLE keyword.
You can merge the results of two or more queries, tables, and SELECT statements, in any combination, using a single UNION statement. The following example merges an existing table named New Accounts and a SELECT statement:
TABLE [New Accounts] UNION ALL
SELECT * FROM Customers
WHERE OrderAmount > 1000;
By default, no duplicate records are returned when you use UNION; however, you can include the ALL predicate to ensure that all records are returned. This also makes the query run faster.
All queries in a UNION operation must request the same number of fields; however, the fields do not have to be of the same size or data type.