Neoview SQL Reference Manual (R2.4)

Datetime Data Types
Values of type datetime are mutually comparable and mutually assignable only if the types have
the same datetime fields. A DATE, TIME, or TIMESTAMP value can be compared with another
value only if the other value has the same data type.
All comparisons are chronological. For example, this predicate is true:
TIMESTAMP '2008-09-28 00:00:00' >
TIMESTAMP '2008-06-26 00:00:00'
Interval Data Types
Values of type INTERVAL are mutually comparable and mutually assignable only if the types
are either both year-month intervals or both day-time intervals.
For example, this predicate is true:
INTERVAL '02-01' YEAR TO MONTH > INTERVAL '00-01' YEAR TO MONTH
The field components of the INTERVAL do not have to be the same. For example, this predicate
is also true:
INTERVAL '02-01' YEAR TO MONTH > INTERVAL '01' YEAR
Numeric Data Types
Values of the approximate data types FLOAT, REAL, and DOUBLE PRECISION, and values of
the exact data types NUMERIC, DECIMAL, INTEGER, SMALLINT, and LARGEINT, are all
numbers and are all mutually comparable and mutually assignable.
When an approximate data type value is assigned to a column with exact data type, rounding
might occur, and the fractional part might be truncated. When an exact data type value is assigned
to a column with approximate data type, the result might not be identical to the original number.
When two numbers are compared, the comparison is made with a temporary copy of one of the
numbers, according to defined rules of conversion. For example, if one number is INTEGER and
the other is DECIMAL, the comparison is made with a temporary copy of the integer converted
to a decimal.
Extended Numeric Precision
Neoview SQL provides support for extended numeric precision data type. Extended numeric
precision is an extension to the NUMERIC(x,y) data type where no theoretical limit exists on
precision. It is a software data type, which means that the underlying hardware does not support
it and all computations are performed by software. Computations using this data type may not
match the performance of other hardware supported data types.
Considerations for Extended NUMERIC Precision Data Type
Consider these points and limitations for extended NUMERIC precision data type:
May cost more than other data type options.
Is a software data type.
Cannot be compared to data types that are supported by hardware.
Not supported for host variable declarations in embedded programs.
Rules for Extended NUMERIC Precision Data Type
These rules apply:
No limit on maximum precision.
Supported in all DDL and DML statements where regular NUMERIC data type is supported.
Allowed as part of key columns for hash partitioned tables only.
NUMERIC type with precision 10 through 18.
232 SQL Language Elements