Data Types for MySQL

The following table lists the data type support for a MySQL database.
The NCHAR, NVARCHAR, REAL, and VABINARY data types are not supported for data type definition.
For data source specific information about MySQL data types, see the MySQL database documentation.
Data Types for MySQL
Data Type Definition Keyword1
MySQL Data Type
Description
Data Type Returned
BIGINT
BIGINT
Large signed, exact whole number.
BIGINT
BINARY(n)
BINARY(n)
Fixed-length binary string.
BINARY(n)
BLOB
Varying-length binary large object string.
CHAR(n)
CHAR(n)
Fixed-length character string.
CHAR(n)
DATE
DATE
Date values.
DATE
DATETIME
Date and time value.
DECIMAL|NUMERIC(p,s)
DECIMAL(p,s)
Signed, fixed-point decimal number.
DECIMAL(p,s)
DOUBLE
DOUBLE
Signed, double precision, floating-point number.
DOUBLE
2
ENUM(values)
Character values from a list of allowed values.
FLOAT(p)
FLOAT(p)
Signed, single precision or double precision, floating-point number.
FLOAT(p)
INTEGER
INT
Regular signed, exact whole number.
INTEGER
2
LONGBLOB
Varying-length binary data.
LONGTEXT
Varying-length character string.
MEDIUMBLOB
Varying-length binary data.
MEDIUMINT
Regular signed, exact whole number.
MEDIUMTEXT
Varying-length character string.
SET(values)
Character values from a list of allowed values.
SMALLINT
SMALLINT
Small signed, exact whole number.
SMALLINT
TEXT
Varying-length text data.
TIME(p)
TIME(p)
Time value.
TIME(p)
TIMESTAMP(p)
TIMESTAMP(p)
Date and time value.
TIMESTAMP(p)
TINYBLOB
Varying-length binary large object string.
TINYINT
TINYINT
Very small signed, exact whole number.
TINYINT
TINYTEXT
Varying-length text data.
VARCHAR(n)
VARCHAR(n)
Varying-length character string.
VARCHAR(n)
1The CT_PRESERVE= connection argument, which controls how data types are mapped, can affect whether a data type can be defined. The values FORCE (default) and FORCE_COL_SIZE do not affect whether a data type can be defined. The values STRICT and SAFE can result in an error if the requested data type is not native to the data source, or the specified precision or scale is not within the data source range.
2The MySQL data type cannot be defined, and when data is retrieved, the native data type is mapped to a similar data type.
Last updated: February 23, 2017