Developing Portable Applications : A. Data Type Mapping : DB2 UDB Gateway : Client Data Type Mapping to DB2 UDB Data Type Mapping
 
Share this page                  
Client Data Type Mapping to DB2 UDB Data Type Mapping
The following table shows client data type mapping to DB2 UDB data type mapping:
Client Data Types
DB2 UDB Data Types
BIGINT
BIGINT
BYTE VARYING(n)
Not supported
BYTE(n)*
Not supported
C
Not supported
CHAR(n)
Note:  CHARACTER(n) is a synonym for CHAR(n).
CHAR(n)
Note:  The length specifier (n) is required in DDL statements.
DATE
TIMESTAMP
DECIMAL(p,s)*
DECIMAL(p,s)*
If the money mapping of DECIMAL(19,4) is selected, all data declared as DECIMAL(19,4) is returned as money.
FLOAT
FLOAT
FLOAT4
REAL
FLOAT8
FLOAT
INTEGER
INTEGER
INTEGER1
SMALLINT
INTEGER2
SMALLINT
INTEGER4
INTEGER
LONG BYTE*
BLOB
LONG VARCHAR*
CLOB
MONEY
FLOAT-Default money data type mapping
DECIMAL(19,4)-Money data type mapping
If you select the money mapping DECIMAL(19,4) for DB2 UDB, all data declared as DECIMAL(19,4) is returned as money.
REAL
REAL
SMALLINT
SMALLINT
TEXT
Not Supported
VARCHAR(n)
VARCHAR(n)
Note:  The length specifier (n) is required in DDL statements.
* If the Ingres client is an Ingres 6.4 installation, the gateway will fail any query that has a result list that contains this data type. This protects the Ingres 6.4 interfaces from being exposed to data types they cannot support. The maximum allowed decimal precision is 31 (0–30) with Ingres 9.2 or higher.