Neoview SQL Reference Manual (R2.5)

Data Types
Neoview SQL data types are character, datetime, interval, or numeric (exact or approximate):
Fixed-length and variable-length character data types.“Character String Data Types” (page 248)
DATE, TIME, and TIMESTAMP data types.“Datetime Data Types” (page 250)
Year-month intervals (years and months) and day-time
intervals (days, hours, minutes, seconds, and fractions of
a second).
“Interval Data Types” (page 251)
Exact and approximate numeric data types.“Numeric Data Types ” (page 253)
Each column in a table is associated with a data type. You can use the CAST expression to convert
data to the data type that you specify. For more information, see “CAST Expression” (page 357).
The following table summarizes the Neoview SQL data types:
Size or Range (1)DescriptionSQL DesignationType
1 to 32707 characters (2)Fixed-length character dataCHAR[ACTER]Fixed-length
character
1 to 32707 bytes (3) (7)Fixed-length character data
in predefined national
character set
NCHAR
1 to 32707 characters (3) (7)Fixed-length character data
in predefined national
character set
NATIONAL CHAR[ACTER]
1 to 32703 characters (4)Variable-length ASCII
character string
VARCHARVariable-length
character
1 to 32703 characters (4)Variable-length ASCII
character string
CHAR[ACTER] VARYING
1 to 32703 bytes (4) (8)Variable-length ASCII
character string
NCHAR VARYING
1 to 32703 characters (4) (8)Variable-length ASCII
character string
NATIONAL CHAR[ACTER]
VARYING
1 to 128 digits; stored:
1 to 4 digits in 2 bytes
5 to 9 digits in 4 bytes
10 to 128 digits in 8-64 bytes,
depending on precision
Binary number with optional
scale; signed or unsigned for
1 to 9 digits
NUMERIC (1,scale) to
NUMERIC (128,scale)
Numeric
0 to 65535 unsigned, -32768 to
+32767 signed; stored in 2 bytes
Binary integer; signed or
unsigned
SMALLINT
0 to 4294967295 unsigned,
-2147483648 to +2147483647 signed;
stored in 4 bytes
Binary integer; signed or
unsigned
INTEGER
-2**63 to +(2**63)-1; stored in 8
bytes
Binary integer; signed onlyLARGEINT
Stored as multiple chunks of 16-bit
integers, with a minimum storage
length of 8 bytes.
Binary integer; signed or
unsigned
NUMERIC (precision 19 to
128)
Numeric
(extended
numeric
precision)
+/- 2.2250738585072014e-308
through
+/-1.7976931348623157e+308; stored
in 8 bytes
Floating point number;
precision designates from 1
through 52 bits of precision
FLOAT[(precision)]Floating point
number
Data Types 243