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 |
BOOLEAN (CHAR(1) with DB2 < 11.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 MINUTE |
TIME |
DATETIME HOUR TO SECOND |
TIME |
DATETIME HOUR TO FRACTION(n) |
TIMESTAMP (for fraction storage) |
DATETIME YEAR TO MONTH |
TIMESTAMP |
DATETIME YEAR TO DAY |
TIMESTAMP |
DATETIME YEAR TO HOUR |
TIMESTAMP |
DATETIME YEAR TO MINUTE |
TIMESTAMP |
DATETIME YEAR TO SECOND |
TIMESTAMP |
DATETIME YEAR TO FRACTION(n) |
TIMESTAMP |
INTERVAL q1 TO q2 |
CHAR(50) |
TEXT |
CLOB (of 500K) |
BYTE |
BLOB (of 500K) |
Notes:
- For more details about serial emulation, see SERIAL and BIGSERIAL data types.