Data type conversion table: Informix to Oracle

Table 1. Data type conversion table (Informix to Oracle)
Informix® data types

ORACLE data types

(Versions 10.x and higher)

CHAR(n)

CHAR(n)

(limit = 2000b!)

VARCHAR(n[,m])

VARCHAR2(n)

(limit = 4000b!)

LVARCHAR(n)

VARCHAR2(n)

(limit = 4000b!)

NCHAR(n)

NCHAR(n)

( limit = 2000b!)

NVARCHAR(n[,m])

NVARCHAR2(n)

( limit = 4000b!)

BOOLEAN CHAR(1)
SMALLINT NUMBER(5,0)
INT / INTEGER NUMBER(10,0)
BIGINT NUMBER(20,0)
INT8 NUMBER(20,0)
SERIAL[(start)] NUMBER(10,0) (see note 1)
BIGSERIAL[(start)] NUMBER(20,0) (see note 1)
SERIAL8[(start)] NUMBER(20,0) (see note 1)
DOUBLE PRECISION / FLOAT[(n)] BINARY_DOUBLE
REAL / SMALLFLOAT BINARY_FLOAT
NUMERIC / DEC / DECIMAL(p,s) NUMBER(p,s)
NUMERIC / DEC / DECIMAL(p) FLOAT(p*3.32193)
NUMERIC / DEC / DECIMAL (not recommended) FLOAT
MONEY(p,s) NUMBER(p,s)
MONEY(p) NUMBER(p,2)
MONEY NUMBER(16,2)
TEXT CLOB (using <= 2Gb!)
BYTE BLOB (using <= 2Gb!)
DATE DATE
DATETIME YEAR TO YEAR DATE
DATETIME YEAR TO MONTH DATE
DATETIME YEAR TO DAY DATE
DATETIME YEAR TO HOUR DATE
DATETIME YEAR TO MINUTE DATE
DATETIME YEAR TO SECOND DATE
DATETIME YEAR TO FRACTION(n) TIMESTAMP(n)
DATETIME MONTH TO MONTH DATE
DATETIME MONTH TO DAY DATE
DATETIME MONTH TO HOUR DATE
DATETIME MONTH TO MINUTE DATE
DATETIME MONTH TO SECOND DATE
DATETIME MONTH TO FRACTION(n) TIMESTAMP(n)
DATETIME DAY TO DAY DATE
DATETIME DAY TO HOUR DATE
DATETIME DAY TO MINUTE DATE
DATETIME DAY TO SECOND DATE
DATETIME DAY TO FRACTION(n) TIMESTAMP(n)
DATETIME HOUR TO HOUR DATE
DATETIME HOUR TO MINUTE DATE
DATETIME HOUR TO SECOND DATE
DATETIME HOUR TO FRACTION(n) TIMESTAMP(n)
DATETIME MINUTE TO MINUTE DATE
DATETIME MINUTE TO SECOND DATE
DATETIME MINUTE TO FRACTION(n) TIMESTAMP(n)
DATETIME SECOND TO SECOND DATE
DATETIME SECOND TO FRACTION(n) TIMESTAMP(n)
DATETIME FRACTION TO FRACTION(n) TIMESTAMP(n)
INTERVAL YEAR[(p)] TO MONTH INTERVAL YEAR[(p)] TO MONTH
INTERVAL MONTH[(p)] TO MONTH CHAR(50)
INTERVAL DAY[(p)] TO FRACTION(n) INTERVAL DAY[(p)] TO SECOND(n)
INTERVAL HOUR[(p)] TO HOUR CHAR(50)
INTERVAL HOUR[(p)] TO MINUTE CHAR(50)
INTERVAL HOUR[(p)] TO SECOND CHAR(50)
INTERVAL HOUR[(p)] TO FRACTION(n) CHAR(50)
INTERVAL MINUTE[(p)] TO MINUTE CHAR(50)
INTERVAL MINUTE[(p)] TO SECOND CHAR(50)
INTERVAL MINUTE[(p)] TO FRACTION(n) CHAR(50)
INTERVAL SECOND[(p)] TO SECOND CHAR(50)
INTERVAL SECOND[(p)] TO FRACTION(n) CHAR(50)
INTERVAL FRACTION[(p)] TO FRACTION CHAR(50)
Notes:
  1. For more details about serial emulation, see SERIAL data types.