Previous Topic: Full-Select StatementNext Topic: Duplicate Rows


Description

UNION

Derives a result table by combining two other result tables. The set of rows in the UNION of result tables R1 and R2 is the set of rows in either R1 or R2, with redundant duplicate rows eliminated. Each row of the UNION table is either a row from R1 or a row from R2.

The columns of the result table are not named.

UNION ALL

As in UNION, derives a result table by combining two other result tables. The set of rows in the UNION ALL of result tables R1 and R2 is the set of rows in either R1 or R2, but UNION ALL specifies not to eliminate duplicate rows when deriving the result table. Each row of the UNION ALL table is either a row from R1 or a row from R2.

The columns of the result table are not named.

subselect

Specify a subselect. For more information about the subselect see Subselect.

Important! If more than two subselects are used, you may not mix UNION with UNION ALL.