Set Operations
The CData Virtuality Server supports the UNION
, UNION ALL
, INTERSECT
, EXCEPT
set operations as a way of combining the results of query expressions.
Usage
queryExpression (UNION|INTERSECT|EXCEPT) [ALL] queryExpression [ORDER BY...]
Syntax Rules
- The output columns will be named by the output columns of the first set operation branch;
- Each
SELECT
must have the same number of output columns and compatible data types for each relative column. Data type conversion will be performed if data types are inconsistent and implicit conversions exist; - If
UNION
,INTERSECT
, orEXCEPT
is specified without all, then the output columns must be comparable types; INTERSECT ALL
, andEXCEPT ALL
are currently not supported.