The following table
lists the data type support for a DB2 database under UNIX and PC hosts.
The NCHAR, NVARCHAR,
and TINYINT data types are not supported for data type definition.
For data source specific
information about the DB2 database data types, see the DB2 database
documentation.
Data Types for DB2 under UNIX and PC Hosts
Data Type Definition
Keyword 1
|
|
|
|
|
|
Large signed, exact
whole number.
|
|
|
|
Fixed-length binary
string.
|
|
|
|
Varying-length binary
large object string.
|
|
|
|
Fixed-length character
string.
|
|
|
|
Varying-length character
large object string.
|
|
|
|
|
|
|
|
Varying-length double-byte
character large object.
|
|
|
|
Signed, fixed-point
decimal number.
|
|
|
|
Signed, double precision,
floating-point number.
|
|
|
|
Signed, single precision
or double precision, floating-point number.
|
|
|
|
Fixed-length graphic
string.
|
|
|
|
Regular signed, exact
whole number.
|
|
|
LONG VARCHAR [FOR BIT
DATA]
|
Varying-length character
or binary string.
|
|
|
|
Varying-length graphic
string.
|
|
|
|
Signed, single precision,
floating-point number.
|
|
|
|
Small signed, exact
whole number.
|
|
|
|
|
|
|
|
|
|
|
|
Varying-length binary
string.
|
|
|
|
Varying-length character
string.
|
|
|
|
Varying-length graphic
string
|
|
1The CT_PRESERVE= connection
argument, which controls how data types are mapped, can affect whether
a data type can be defined. The values FORCE (default) and FORCE_COL_SIZE
do not affect whether a data type can be defined. The values STRICT
and SAFE can result in an error if the requested data type is not
native to the data source, or the specified precision or scale is
not within the data source range.
|
2The DB2 data type cannot
be defined, and when data is retrieved, the native data type is mapped
to a similar data type.
|