Data Types

MySQL Data Types

MySQL supports several SQL data types like: numeric types, date and time types, string types, spatial types and JSON data type.

Numeric Types

INT
SMALLINT
TINYINT
MEDIUMINT
BIGINT
DECIMAL
NUMERIC
FLOAT
DOUBLE
REAL
BIT

The keyword INT is a synonym for INTEGER.
NUMERIC is implemented as DECIMAL.
The keyword DOUBLE is a synonym for DOUBLE PRECISION.
The keyword REAL is a synonym for DOUBLE PRECISION.

Date and Time Types

DATE
TIME
DATETIME
TIMESTAMP
YEAR

String Types

CHAR
VARCHAR
BINARY
VARBINARY
BLOB
TEXT
ENUM
SET

Extensions for Spatial Data

GEOMETRY
POINT
LINESTRING
POLYGON
MULTIPOINT
MULTILINESTRING
MULTIPOLYGON
GEOMETRYCOLLECTION