This topic describes incompatibilities between MySQL databases and MySQL tenants of OceanBase Database when you change the type of an unconstrained column.
The following table describes the types to which you can change a column by executing the ALTER TABLE table_name MODIFY/CHANGE COLUMN DDL statement in a MySQL database and a MySQL tenant of OceanBase Database.
In the following table, a hyphen (-) means N/A, and 'All' means all types.
Column type in a MySQL database | Supported target type other than the original type | Column type in a MySQL tenant of OceanBase Database | Supported target type other than the original type |
INT | All | INTEGER | BIGINT |
TINYINT | All | TINYINT | INTEGER<br>SMALLINT<br>MEDIUMINT<br>BIGINT<br>BOOLEAN |
SMALLINT | All | SMALLINT | INTEGER<br> BIGINT<br>MEDIUMINT |
MEDIUMINT | All | MEDIUMINT | INTEGER<br>BIGINT |
BIGINT | All | BIGINT | - |
BOOL | All | BOOLEAN | INTEGER<br>TINYINT<br>SMALLINT<br> MEDIUMINT<br> BIGINT |
DECIMAL | All | DECIMAL | NUMERIC |
NUMERIC | All | NUMERIC | DECIMAL |
REAL | All | FLOAT | - |
DOUBLE | All | DOUBLE | - |
FLOAT | All | FLOAT | - |
BIT | All | BIT | - |
CHAR | All | CHAR | - |
NCHAR | All | CHAR | - |
VARCHAR | All | VARCHAR | TINYTEXT<br>TEXT<br>LONGTEXT<br> MEDIUMTEXT |
BINARY | All | BINARY | - |
VARBINARY | All | VARBINARY | BLOB<br>TINYBLOB<br> MEDIUMBLOB<br> LONGBLOB |
LONG_VARBINARY | All | BLOB | - |
YEAR | All | YEAR | - |
DATE | All | DATE | - |
TIME | All | TIME | - |
TIMESTAMP | All | TIMESTAMP | - |
DATETIME | All | DATETIME | - |
TINYBLOB | All | TINYBLOB | BLOB<br>LONGBLOB<br>MEDIUMBLOB |
MEDIUMBLOB | All | MEDIUMBLOB | - |
BLOB | All | BLOB | - |
LONGBLOB | All | LONGBLOB | - |
TINYTEXT | All | TINYTEXT | TEXT<br> LONGTEXT<br> MEDIUMTEXT |
MEDIUMTEXT | All | MEDIUMTEXT | - |
TEXT | All | TEXT | - |
LONGTEXT | All | LONGTEXT | - |
ENUM | All | ENUM | - |
SET | All | SET | - |
JSON | All | JSON | - |