MySQL Data Types
MySQL supports multiple data types, and this page summarizes the common data types in MySQL.
-
BIGINT
BIGINTis a commonly used data type in MySQL for storing large integer values. -
BINARY
BINARYis a commonly used data type in MySQL for storing binary data. -
BIT
BITis a common data type used in MySQL for storing bit data. -
BLOB
BLOBis a data type in MySQL used for storing large amounts of binary data. -
BOOLEAN
The MySQLBOOLEANdata type is used to store boolean values, which can beTRUEorFALSE. -
CHAR
CHARis a data type in MySQL used for storing fixed-length string data. -
DATE
In MySQL,DATEis a date data type used for storing year, month, and day values. -
DATETIME
TheDATETIMEdata type in MySQL is a date and time format that can store dates and times. -
DECIMAL
DECIMALis a MySQL data type used for storing precise numeric values. -
DOUBLE
The MySQLDOUBLEdata type is used to store double-precision floating-point numbers, which are 64-bit (8-byte) IEEE floating-point numbers. -
ENUM
TheENUMdata type is a special data type in MySQL used to represent a set of predefined values. -
FLOAT
FLOATis a numeric data type in MySQL used to store single-precision floating-point numbers (4 bytes). -
GEOMETRY
GEOMETRYis one of the data types in MySQL used for storing spatial data. -
INT
The MySQLINTdata type can store integer values ranging from -2147483648 to 2147483647. -
INTEGER
MySQLINTEGERis a commonly used data type for storing integer data. -
JSON
In MySQL, theJSONdata type allows users to store and process data in JSON format. -
LONGTEXT
MySQLLONGTEXTis a data type used to store longer text data. -
MEDIUMINT
MEDIUMINTis a type of integer in MySQL. It occupies 3 bytes of storage and can store signed integers ranging from -8388608 to 8388607. -
MEDIUMTEXT
MySQLMEDIUMTEXTis a data type used to store medium-length text data. -
SET
TheSETdata 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
MySQLSMALLINTdata type is used for storing integer data that ranges from -32768 to 32767. -
TEXT
In MySQL, theTEXTdata type is used to store longer text strings. -
TIME
TheTIMEdata type in MySQL is used to store time values, including hours, minutes, seconds, and milliseconds. -
TIMESTAMP
TheTIMESTAMPdata type in MySQL is used to store dates and times. -
TINYINT
MySQLTINYINTis a data type used for storing small integers. -
TINYTEXT
The MySQLTINYTEXTdata type is a data type used to store short text, with a maximum limit of 255 characters. -
VARBINARY
MySQLVARBINARYdata type is used to store binary data. -
VARCHAR
VARCHARis one of the data types in MySQL used for storing string type data. -
YEAR
TheYEARdata type in MySQL is used to store year values.