Data Type (MySQL) |
Data Type (GaussDB(for openGauss)) |
Whether to Support Mapping |
---|---|---|
CHAR |
CHARACTER |
Yes. If a column of this type in the source database contains characters that occupy more than one byte, increase the length of the column in the destination database. |
VARCHAR |
CHARACTER VARYING() |
Yes. If a column of this type in the source database contains characters that occupy more than one byte, increase the length of the column in the destination database. |
BINARY |
BYTEA |
Yes |
VARBINARY |
BYTEA |
Yes |
TINYBLOB |
BYTEA |
Yes |
BLOB |
BYTEA/BLOB |
Yes |
MEDIUMBLOB |
BYTEA |
Yes |
LONGBLOB |
BYTEA |
Yes |
TINYTEXT |
TEXT |
Yes |
TEXT |
TEXT |
Yes |
MEDIUMTEXT |
TEXT |
Yes |
LONGTEXT |
TEXT |
Yes |
ENUM |
VARCHAR |
Yes |
SET |
VARCHAR |
Yes |
TINYINT |
SMALLINT |
Yes |
SMALLINT |
SMALLINT |
Yes |
MEDIUMINT |
INT |
Supported |
INT |
INT |
Yes |
BIGINT |
BIGINT |
Yes |
FLOAT |
FLOAT4 |
Yes |
DOUBLE |
FLOAT8 |
Yes |
DATE |
DATE |
Yes |
DATETIME |
TIMESTAMP WITHOUT TIME ZONE |
Yes |
TIMESTAMP |
TIMESTAMP WITH TIME ZONE |
Yes |
TIME |
TIME |
Yes |
BIT |
BIT |
Yes |
DATETIME values supported by MySQL range from '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
TIMESTAMP values supported by MySQL range from '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.
For details, see official MySQL documentation.
For GaussDB(or openGauss), 0000-00-00 is an invalid date and will be converted to 1970-01-01 by DRS. For example, '0000-00-00' of the DATE type in MySQL is converted to '1970-01-01' by DRS, and '1000-00-31 23:59:59' of the DATETIME or TIMESTAMP type in MySQL is converted to '1970-01-01 00:00:00' by DRS.