SQL adaptation guide For Oracle Database 9.2, 10.x, 11.x, 12x / Data dictionary |
Informix® data types | ORACLE data types (Versions 9.2) |
ORACLE data types (Versions 10.x and higher) |
---|---|---|
CHAR(n) | CHAR(n) (limit = 2000b!) |
CHAR(n) (limit = 2000b!) |
VARCHAR(n[,m]) | VARCHAR2(n) (limit = 4000b!) |
VARCHAR2(n) (limit = 4000b!) |
LVARCHAR(n) | VARCHAR2(n) (limit = 4000b!) |
VARCHAR2(n) (limit = 4000b!) |
NCHAR(n) | NCHAR(n) ( limit = 2000b!) |
NCHAR(n) ( limit = 2000b!) |
NVARCHAR(n[,m]) | NVARCHAR2(n) ( limit = 4000b!) |
NVARCHAR2(n) ( limit = 4000b!) |
BOOLEAN | CHAR(1) | CHAR(1) |
SMALLINT | NUMBER(5,0) | NUMBER(5,0) |
INT / INTEGER | NUMBER(10,0) | NUMBER(10,0) |
BIGINT | NUMBER(20,0) | NUMBER(20,0) |
INT8 | NUMBER(20,0) | NUMBER(20,0) |
SERIAL[(start)] | NUMBER(10,0)(see notes) | NUMBER(10,0)(see notes) |
BIGSERIAL[(start)] | NUMBER(20,0)(see notes) | NUMBER(20,0)(see notes) |
SERIAL8[(start)] | NUMBER(20,0)(see notes) | NUMBER(20,0)(see notes) |
DOUBLE PRECISION / FLOAT[(n)] | NUMBER | BINARY_DOUBLE |
REAL / SMALLFLOAT | NUMBER | BINARY_FLOAT |
NUMERIC / DEC / DECIMAL(p,s) | NUMBER(p,s) | NUMBER(p,s) |
NUMERIC / DEC / DECIMAL(p) | FLOAT(p*3.32193) | FLOAT(p*3.32193) |
NUMERIC / DEC / DECIMAL (not recommended) | FLOAT | FLOAT |
MONEY(p,s) | NUMBER(p,s) | NUMBER(p,s) |
MONEY(p) | NUMBER(p,2) | NUMBER(p,2) |
MONEY | NUMBER(16,2) | NUMBER(16,2) |
TEXT | CLOB (using <= 2Gb!) | CLOB (using <= 2Gb!) |
BYTE | BLOB (using <= 2Gb!) | BLOB (using <= 2Gb!) |
DATE | DATE | DATE |
DATETIME YEAR TO YEAR | DATE | DATE |
DATETIME YEAR TO MONTH | DATE | DATE |
DATETIME YEAR TO DAY | DATE | DATE |
DATETIME YEAR TO HOUR | DATE | DATE |
DATETIME YEAR TO MINUTE | DATE | DATE |
DATETIME YEAR TO SECOND | DATE | DATE |
DATETIME YEAR TO FRACTION(n) | TIMESTAMP(n) | TIMESTAMP(n) |
DATETIME MONTH TO MONTH | DATE | DATE |
DATETIME MONTH TO DAY | DATE | DATE |
DATETIME MONTH TO HOUR | DATE | DATE |
DATETIME MONTH TO MINUTE | DATE | DATE |
DATETIME MONTH TO SECOND | DATE | DATE |
DATETIME MONTH TO FRACTION(n) | TIMESTAMP(n) | TIMESTAMP(n) |
DATETIME DAY TO DAY | DATE | DATE |
DATETIME DAY TO HOUR | DATE | DATE |
DATETIME DAY TO MINUTE | DATE | DATE |
DATETIME DAY TO SECOND | DATE | DATE |
DATETIME DAY TO FRACTION(n) | TIMESTAMP(n) | TIMESTAMP(n) |
DATETIME HOUR TO HOUR | DATE | DATE |
DATETIME HOUR TO MINUTE | DATE | DATE |
DATETIME HOUR TO SECOND | DATE | DATE |
DATETIME HOUR TO FRACTION(n) | TIMESTAMP(n) | TIMESTAMP(n) |
DATETIME MINUTE TO MINUTE | DATE | DATE |
DATETIME MINUTE TO SECOND | DATE | DATE |
DATETIME MINUTE TO FRACTION(n) | TIMESTAMP(n) | TIMESTAMP(n) |
DATETIME SECOND TO SECOND | DATE | DATE |
DATETIME SECOND TO FRACTION(n) | TIMESTAMP(n) | TIMESTAMP(n) |
DATETIME FRACTION TO FRACTION(n) | TIMESTAMP(n) | TIMESTAMP(n) |
INTERVAL YEAR[(p)] TO MONTH | INTERVAL YEAR[(p)] TO MONTH | INTERVAL YEAR[(p)] TO MONTH |
INTERVAL MONTH[(p)] TO MONTH | CHAR(50) | CHAR(50) |
INTERVAL DAY[(p)] TO FRACTION(n) | INTERVAL DAY[(p)] TO SECOND(n) | INTERVAL DAY[(p)] TO SECOND(n) |
INTERVAL HOUR[(p)] TO HOUR | CHAR(50) | CHAR(50) |
INTERVAL HOUR[(p)] TO MINUTE | CHAR(50) | CHAR(50) |
INTERVAL HOUR[(p)] TO SECOND | CHAR(50) | CHAR(50) |
INTERVAL HOUR[(p)] TO FRACTION(n) | CHAR(50) | CHAR(50) |
INTERVAL MINUTE[(p)] TO MINUTE | CHAR(50) | CHAR(50) |
INTERVAL MINUTE[(p)] TO SECOND | CHAR(50) | CHAR(50) |
INTERVAL MINUTE[(p)] TO FRACTION(n) | CHAR(50) | CHAR(50) |
INTERVAL SECOND[(p)] TO SECOND | CHAR(50) | CHAR(50) |
INTERVAL SECOND[(p)] TO FRACTION(n) | CHAR(50) | CHAR(50) |
INTERVAL FRACTION[(p)] TO FRACTION | CHAR(50) | CHAR(50) |