Syntax

If you include an ORDER BY clause, that clause applies to the
intersection operation.

DISTINCT

(Optional). Indicates that only distinct (non-duplicate) rows from the
queries are included. This is the default.

ALL

(Optional). Indicates that all rows from the queries are included,
including duplicates.

Usage

Each SELECT statement in the union must contain the same number of
columns, with similar data types, in the same order. Although the
number, data types, and order of the fields in the select queries that
you combine in a UNION clause must correspond, you can use
expressions, such as calculations or subqueries, to make them
correspond.

Each UNION keyword combines the SELECT statements that immediately
precede and follow it. If you use the ALL keyword with some of the
UNION keywords in your query, but not with others, the results will
include duplicate rows from the pairs of SELECT statements that are
combined by using UNION ALL, but will not include duplicate rows from
the SELECT statements that are combined by using UNION without the
ALL keyword.