Neoview SQL Reference Manual (R2.3)

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 210)
DATE, TIME, and TIMESTAMP data types.“Examples of SET TABLE TIMEOUT” (page 169)
Year-month intervals (years and months) and day-time
intervals (days, hours, minutes, seconds, and fractions of
a second).
“Interval Data Types” (page 214)
Exact and approximate numeric data types.“Numeric Data Types ” (page 215)
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 309).
The following table summarizes the Neoview SQL data types:
Size or Range (1)DescriptionSQL DesignationType
1 to 4036 characters (2)Fixed-length character dataCHAR[ACTER]Fixed-length
character
1 to 4036 characters (3)Fixed-length character data
in predefined national
character set
NCHAR
1 to 4036 characters (3)Fixed-length character data
in predefined national
character set
NATIONAL CHAR[ACTER]
1 to 4028 characters (4)Variable-length ASCII
character string
VARCHARVariable-length
character
Maximum length is data source
dependent.
Variable-length ASCII
character string
LONG VARCHAR
1 to 4028 characters (4)Variable-length ASCII
character string
CHAR[ACTER] VARYING
1 to 4028 characters (5)Variable-length ASCII
character string
NCHAR VARYING
1 to 4028 characters (5)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 bytes
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-; stored in 8 bytesBinary integer; signed onlyLARGEINT
+/- 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
+/- 1.17549435e-38 through +/
3.40282347e+38; stored in 4 bytes
Floating point number (32
bits)
REAL
Data Types 207