MySQL Data Types Reference
Use this reference to compare MySQL column data types and choose a type for numeric, string, temporal, or binary values.
-
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
Compare MySQL TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB byte limits, and learn why packet settings can restrict transfers. -
BOOLEAN
MySQL BOOLEAN and BOOL are TINYINT(1) aliases, not 0/1 restrictions. Learn TRUE/FALSE storage, truth tests, and how to enforce two values. -
CHAR
Learn MySQL CHAR length limits, space padding and retrieval behavior, and when a fixed-length string fits better than VARCHAR. -
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
Learn MySQL DOUBLE storage, the DOUBLE PRECISION synonym, floating-point comparison limits, and when DECIMAL is a better choice. -
ENUM
TheENUMdata type is a special data type in MySQL used to represent a set of predefined values. -
FLOAT
Learn MySQL FLOAT storage, FLOAT(p) behavior, deprecated M,D syntax, and why approximate values should not represent exact prices. -
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
MySQL’s native JSON type validates documents and stores them in an optimized binary format. Learn its defaults, indexing options, and practical use. -
LONGTEXT
Learn MySQL LONGTEXT’s 4,294,967,295-byte type limit, charset-dependent character capacity, and client/server packet constraints. -
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
Learn MySQL MEDIUMTEXT’s 16,777,215-byte limit, why the character count depends on charset, and how it compares with VARCHAR and TEXT. -
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
Learn MySQL TEXT’s 65,535-byte limit, charset-dependent character capacity, lack of DEFAULT values, and prefix-index requirement. -
TIME
MySQL TIME stores a time-of-day value or an elapsed duration, including negative values and durations longer than 24 hours. -
TIMESTAMP
TheTIMESTAMPdata type in MySQL is used to store dates and times. -
TINYINT
See signed and unsigned TINYINT ranges, storage size, the BOOLEAN alias, and why TINYINT(1) does not limit values to 0 and 1. -
TINYTEXT
Learn MySQL TINYTEXT’s 255-byte capacity, how multibyte character sets reduce the number of characters, and when VARCHAR fits better. -
VARBINARY
MySQLVARBINARYdata type is used to store binary data. -
VARCHAR
Learn MySQL VARCHAR’s character limit, row-size and character-set constraints, storage behavior, and how it differs from CHAR. -
YEAR
TheYEARdata type in MySQL is used to store year values.