MySQL Data Types
MySQL supports multiple data types, and this page summarizes the common data types in MySQL.
-
BIGINT
BIGINT
is a commonly used data type in MySQL for storing large integer values. -
BINARY
BINARY
is a commonly used data type in MySQL for storing binary data. -
BIT
BIT
is a common data type used in MySQL for storing bit data. -
BLOB
BLOB
is a data type in MySQL used for storing large amounts of binary data. -
BOOLEAN
The MySQLBOOLEAN
data type is used to store boolean values, which can beTRUE
orFALSE
. -
CHAR
CHAR
is a data type in MySQL used for storing fixed-length string data. -
DATE
In MySQL,DATE
is a date data type used for storing year, month, and day values. -
DATETIME
TheDATETIME
data type in MySQL is a date and time format that can store dates and times. -
DECIMAL
DECIMAL
is a MySQL data type used for storing precise numeric values. -
DOUBLE
The MySQLDOUBLE
data type is used to store double-precision floating-point numbers, which are 64-bit (8-byte) IEEE floating-point numbers. -
ENUM
TheENUM
data type is a special data type in MySQL used to represent a set of predefined values. -
FLOAT
FLOAT
is a numeric data type in MySQL used to store single-precision floating-point numbers (4 bytes). -
GEOMETRY
GEOMETRY
is one of the data types in MySQL used for storing spatial data. -
INT
The MySQLINT
data type can store integer values ranging from -2147483648 to 2147483647. -
INTEGER
MySQLINTEGER
is a commonly used data type for storing integer data. -
JSON
In MySQL, theJSON
data type allows users to store and process data in JSON format. -
LONGTEXT
MySQLLONGTEXT
is a data type used to store longer text data. -
MEDIUMINT
MEDIUMINT
is a type of integer in MySQL. It occupies 3 bytes of storage and can store signed integers ranging from -8388608 to 8388607. -
MEDIUMTEXT
MySQLMEDIUMTEXT
is a data type used to store medium-length text data. -
SET
TheSET
data type in MySQL is a type of data type used to store multiple values in a single field, allowing us to store up to 64 different values. -
SMALLINT
MySQLSMALLINT
data type is used for storing integer data that ranges from -32768 to 32767. -
TEXT
In MySQL, theTEXT
data type is used to store longer text strings. -
TIME
TheTIME
data type in MySQL is used to store time values, including hours, minutes, seconds, and milliseconds. -
TIMESTAMP
TheTIMESTAMP
data type in MySQL is used to store dates and times. -
TINYINT
MySQLTINYINT
is a data type used for storing small integers. -
TINYTEXT
The MySQLTINYTEXT
data type is a data type used to store short text, with a maximum limit of 255 characters. -
VARBINARY
MySQLVARBINARY
data type is used to store binary data. -
VARCHAR
VARCHAR
is one of the data types in MySQL used for storing string type data. -
YEAR
TheYEAR
data type in MySQL is used to store year values.