Updated on 2023-07-03 GMT+08:00

Oracle->MySQL

Table 1 Data type mapping

Data Type (Oracle)

Condition

Data Type (MySQL)

Whether to Support Mapping

CHAR

length<=255

CHAR

Yes

CHAR

length>255

VARCHAR

Yes

VARCHAR

Length (row size) ≤ 65536

VARCHAR

Yes

VARCHAR

Length (row size) > 65536

TEXT

Yes

VARCHAR2

-

VARCHAR2

Yes

NCHAR

length<=255

NCHAR

Yes

NCHAR

length>255

NVARCHAR

Yes

NVARCHAR2

-

NVARCHAR

Yes

NUMBER

precision=0 scale = 0

DECIMAL(65,30)

Yes

NUMBER

precision!=0 scale!=0

DECIMAL(precision, scale)

Yes

FLOAT

-

FLOAT

Yes

BINARY_FLOAT

-

FLOAT

Yes

BINARY_DOUBLE

-

DOUBLE

Yes

DATE

-

DATETIME

Yes

TIMESTAMP

-

DATETIME

Yes

TIMESTAMP WITH TIME ZONE

6 digit precision

TIMESTAMP

Yes

TIMESTAMP WITH LOCAL TIME ZONE

6 digit precision

TIMESTAMP

Yes

INTERVAL

6 digit precision

VARCHAR(30)

Yes

BLOB

-

LONGBLOB

Yes

CLOB

-

LONGTEXT

Yes

NCLOB

-

LONGTEXT

Yes

LONG

-

LONGTEXT

Yes

RAW

-

VARBINARY

Yes

LONG RAW

-

LONGBLOB

Yes

ROWID

-

VARCHAR(18)

Yes

UROWID

-

-

No

XMLTYPE

-

-

No

BFILE

-

-

No

SDO_GEOMETRY

-

-

No