Data type conversion table: Informix to DB2
Informix® data types | DB2® data types |
---|---|
CHAR(n) |
CHAR(n) (max is 254 chars ) |
VARCHAR(n[,m]) |
VARCHAR(n) (max is 32672 chars) |
LVARCHAR(n) |
VARCHAR(n) (max is 32672 chars) |
NCHAR(n) |
N/A |
NVARCHAR(n[,m]) |
N/A |
BOOLEAN |
CHAR(1) |
SMALLINT |
SMALLINT |
INTEGER |
INTEGER |
BIGINT |
BIGINT |
INT8 |
BIGINT |
SERIAL[(start)] |
INTEGER (see note 1) |
BIGSERIAL[(start)] |
BIGINT (see note 1) |
SERIAL8[(start)] |
BIGINT (see note 1) |
DOUBLE PRECISION / FLOAT[(n)] |
FLOAT[(n)] / DOUBLE |
REAL / SMALLFLOAT |
REAL |
DECIMAL(p,s) |
DECIMAL(p,s) (max is 31 digits) |
DECIMAL(p) with p<=15 |
DECFLOAT(16) |
DECIMAL(p) with p>15 |
DECFLOAT(16) if p=16,
DECFLOAT(34) if p>16 |
DECIMAL |
DECFLOAT(34) |
MONEY(p,s) |
DECIMAL(p,s) (max is 31 digits) |
MONEY(p) |
DECIMAL(p,2) (max is 31 digits) |
MONEY |
DECIMAL(16,2) |
DATE |
DATE |
DATETIME HOUR TO SECOND |
TIME |
DATETIME q1 TO q2 (different from
above) |
TIMESTAMP |
INTERVAL q1 TO q2 |
CHAR(50) |
TEXT |
CLOB (of 500K) |
BYTE |
BLOB (of 500K) |
Notes:
- For more details about serial emulation, see SERIAL data types.