Enterprise Edition Home |
Express Edition Home |
Previous Page | Next Page SQL Statements > SELECT >
Several restrictions apply on the queries that you can connect with a UNION
operator, as the following list describes:
- In ESQL/C, you cannot use an INTO clause in a compound query unless exactly
one row is returned, and you are not using a cursor. In this case, the INTO
clause must be in the first SELECT statement.
- The number of items in the Projection clause of each query must be the
same, and the corresponding items in each Projection clause must have compatible
data types.
- The Projection clause of each query cannot specify BYTE or TEXT columns.
(This restriction does not apply to UNION ALL operations.)
- If you use an ORDER BY clause, it must follow the last Projection
clause, and you must refer to the item ordered by integer, not by identifier.
Sorting takes place after the set operation is complete.
You can store the combined results of a UNION operator
in a temporary table, but the INTO TEMP clause can appear only in the final
SELECT statement.
Enterprise Edition Home |
Express Edition Home |
[ Top of Page | Previous Page | Next Page | Contents |
Index ]