Previous Topic Next topic Print topic


UNION Clause

The UNION clause combines the results of two or more subselects into a single output. It combines the output of from 2 through 33 subselect statements into a single result. The actual number of subselect results that can be attached with UNION clauses depends on the complexity of the queries, and the number of other queries open at the time of execution. The data types and lengths of each column in any two subselect tables must be identical in order for query results to be merged. The column names displayed in the result are taken from the first subselect table. When processing the subqueries of a UNION clause, the XDB Server removes duplicate rows (unless UNION ALL is specified).

Syntax

The format for UNION clause queries appears below:

subselect [(fullselect)]
  [UNION | UNION ALL]
  [subselect [(fullselect)]]

where:

subselect Components referring to any valid subselect.
ALL Causes duplicate rows to be included in the output results.
Previous Topic Next topic Print topic