SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual544517-008
2-218
Considerations for UNION
If both columns are of exact numeric data types, RESULT contains an exact
numeric value whose precision and scale are equal to the greater of the two
contributing columns.
If both columns are of approximate numeric data types, RESULT contains an
approximate numeric value whose precision is equal to the greater of the two
contributing columns.
If both columns are of datetime data type (DATE, TIME, or TIMESTAMP), the
corresponding column in RESULT has the same data type.
If both columns are INTERVAL data type and both columns are either year-month
or day-time, RESULT contains an INTERVAL value whose range of fields is the
most significant start field to the least significant end field of the INTERVAL fields in
the contributing columns. (The year-month fields are YEAR and MONTH. The
day-time fields are DAY, HOUR, MINUTE, and SECOND.)
For example, suppose that the column in TABLE1 has the data type INTERVAL
HOUR TO MINUTE, and the column in TABLE2 has the data type INTERVAL DAY
TO HOUR. The data type of the column resulting from the union operation is
INTERVAL DAY TO MINUTE.
If both columns are described with NOT NULL, the corresponding column of
RESULT cannot be null. Otherwise, the column can be null.