This topic describes the supported scope of data type conversion during data migration from a MySQL database to a MySQL tenant of OceanBase Database.
Supported data type conversion
Numeric data types
| Category | MySQL database | MySQL tenant of OceanBase Database |
| Integer data types You can specify the length and the SIGNED, UNSIGNED, or ZEROFILL attribute of an integer field. |
INT | INT |
| TINYINT | TINYINT | |
| SMALLINT | SMALLINT | |
| MEDIUMINT | MEDIUMINT | |
| BIGINT | BIGINT | |
| BOOL/BOOLEAN | BOOLEAN | |
| Fixed-point data types | DECIMAL | DECIMAL |
| NUMERIC | NUMERIC | |
| Floating-point data types | REAL | FLOAT |
| DOUBLE | DOUBLE | |
| FLOAT | FLOAT | |
| BIT data type | BIT | BIT |
Character data types
MySQL databases |
MySQL tenants of OceanBase Database |
|---|---|
| CHAR | CHAR |
| NCHAR | CHAR |
| VARCHAR | VARCHAR |
| BINARY | BINARY |
| VARBINARY | VARBINARY |
| LONG VARBINARY | BLOB |
Date and time data types
MySQL databases |
MySQL tenants of OceanBase Database |
|---|---|
| YEAR | YEAR |
| DATE | DATE |
| TIME | TIME |
| TIMESTAMP | TIMESTAMP |
| DATETIME | DATETIME |
BLOB and TEXT data types
MySQL databases |
MySQL tenants of OceanBase Database |
|---|---|
| TINYBLOB | TINYBLOB |
| MEDIUMBLOB | MEDIUMBLOB |
| BLOB | BLOB |
| LONGBLOB | LONGBLOB |
| TINYTEXT | TINYTEXT |
| MEDIUMTEXT | MEDIUMTEXT |
| TEXT | TEXT |
| LONGTEXT | LONGTEXT |
Enumeration and set data types
MySQL databases |
MySQL tenants of OceanBase Database |
|---|---|
| ENUM | ENUM |
| SET | SET |
JSON data type
MySQL databases |
MySQL tenants of OceanBase Database |
|---|---|
| JSON | TEXT (for MySQL tenants of OceanBase Database of a version earlier than V3.2.3) or JSON (for MySQL tenants of OceanBase Database V3.2.3 and later) |
GIS data types
Notice
OceanBase Database V3.2.4 and V4.1.0 support the following GIS data types.
MySQL databases |
MySQL tenants of OceanBase Database |
|---|---|
| GEOMETRY | GEOMETRY |
| GEOMETRYCOLLECTION | GEOMETRYCOLLECTION |
| POINT | POINT |
| MULTIPOINT | MULTIPOINT |
| LINESTRING | LINESTRING |
| MULTILINESTRING | MULTILINESTRING |
| POLYGON | POLYGON |
| MULTIPOLYGON | MULTIPOLYGON |
Unsupported data type conversion
Notice
If a data type that cannot be converted is used in a statement, the generated statement will be empty.
The SERIAL type is not supported.
