四、oracle表结构移植到MysqL中需要的类型转换
MysqL ORACLE
BLOB(220) RAW(220)
BLOB(20) RAW(20)
BLOG(1024) RAW(1024)
VARCHAR(n) VARCHAR2(n)
CHAR CHAR
FLOAT(22,6) NUMBER(22,6)
DOUBLE(44,12) NUMBER(44,12)
TINYINT (3) NUMBER(3)
SMALLINT(5) NUMBER(5)
MEDIUMINT(8) NUMBER(8)
INT(10) NUMBER(10)
BIGINT(20) NUMBER(20)
DATATIME DATA
五、MysqL和oracle数据类型对应关系参照表
MysqL Data Type |
Oracle Data Type |
BIGINT |
NUMBER(19,0) |
BIT |
RAW |
BLOB |
BLOB,RAW |
CHAR |
CHAR |
DATE |
DATE |
DATETIME |
DATE |
DECIMAL |
FLOAT (24) |
DOUBLE |
FLOAT (24) |
DOUBLE PRECISION |
FLOAT (24) |
ENUM |
VARCHAR2 |
FLOAT |
FLOAT |
INT |
NUMBER(10,0) |
INTEGER |
NUMBER(10,0) |
LONGBLOB |
BLOB,RAW |
LONGTEXT |
CLOB,RAW |
MEDIUMBLOB |
BLOB,RAW |
MEDIUMINT |
NUMBER(7,0) |
MEDIUMTEXT |
CLOB,RAW |
NUMERIC |
NUMBER |
REAL |
FLOAT (24) |
SET |
VARCHAR2 |
SMALLINT |
NUMBER(5,0) |
TEXT |
VARCHAR2,CLOB |
TIME |
DATE |
TIMESTAMP |
DATE |
TINYBLOB |
RAW |
TINYINT |
NUMBER(3,0) |
TINYTEXT |
VARCHAR2 |
VARCHAR |
VARCHAR2,CLOB |
YEAR |
NUMBER |