Download Informix Guide to SQL: Reference

Transcript
SYSCOLUMNS
Length for Time Data Types
For columns of type DATETIME or INTERVAL, collength is determined using
the following formula:
(length * 256) + (largest_qualifier_value * 16) + smallest_qualifier_value
The length is the physical length of the DATETIME or INTERVAL field, and
largest_qualifier and smallest_qualifier have the values that the following table
shows.
Field Qualifier
Value
YEAR
0
MONTH
2
DAY
4
HOUR
6
MINUTE
8
SECOND
10
FRACTION(1)
11
FRACTION(2)
12
FRACTION(3)
13
FRACTION(4)
14
FRACTION(5)
15
For example, if a DATETIME YEAR TO MINUTE column has a length of 12
(such as YYYY:DD:MM:HH:MM), a largest_qualifier value of 0 (for YEAR), and a
smallest_qualifier value of 8 (for MINUTE), the collength value is 3080 or
(256 * 12) + (0 * 16) + 8.
Length of Simple-Large-Object Columns
If the data type of the column is BYTE or TEXT, collength holds the length of
the descriptor.
1-34
Informix Guide to SQL: Reference