Menu

MySQL Data Types Reference

Use this reference to compare MySQL column data types and choose a type for numeric, string, temporal, or binary values.

  1. BIGINT

    BIGINT is a commonly used data type in MySQL for storing large integer values.
  2. BINARY

    BINARY is a commonly used data type in MySQL for storing binary data.
  3. BIT

    BIT is a common data type used in MySQL for storing bit data.
  4. BLOB

    Compare MySQL TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB byte limits, and learn why packet settings can restrict transfers.
  5. 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.
  6. CHAR

    Learn MySQL CHAR length limits, space padding and retrieval behavior, and when a fixed-length string fits better than VARCHAR.
  7. DATE

    In MySQL, DATE is a date data type used for storing year, month, and day values.
  8. DATETIME

    The DATETIME data type in MySQL is a date and time format that can store dates and times.
  9. DECIMAL

    DECIMAL is a MySQL data type used for storing precise numeric values.
  10. DOUBLE

    Learn MySQL DOUBLE storage, the DOUBLE PRECISION synonym, floating-point comparison limits, and when DECIMAL is a better choice.
  11. ENUM

    The ENUM data type is a special data type in MySQL used to represent a set of predefined values.
  12. FLOAT

    Learn MySQL FLOAT storage, FLOAT(p) behavior, deprecated M,D syntax, and why approximate values should not represent exact prices.
  13. GEOMETRY

    GEOMETRY is one of the data types in MySQL used for storing spatial data.
  14. INT

    The MySQL INT data type can store integer values ranging from -2147483648 to 2147483647.
  15. INTEGER

    MySQL INTEGER is a commonly used data type for storing integer data.
  16. JSON

    MySQL’s native JSON type validates documents and stores them in an optimized binary format. Learn its defaults, indexing options, and practical use.
  17. LONGTEXT

    Learn MySQL LONGTEXT’s 4,294,967,295-byte type limit, charset-dependent character capacity, and client/server packet constraints.
  18. 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.
  19. 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.
  20. SET

    The SET 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.
  21. SMALLINT

    MySQL SMALLINT data type is used for storing integer data that ranges from -32768 to 32767.
  22. TEXT

    Learn MySQL TEXT’s 65,535-byte limit, charset-dependent character capacity, lack of DEFAULT values, and prefix-index requirement.
  23. TIME

    MySQL TIME stores a time-of-day value or an elapsed duration, including negative values and durations longer than 24 hours.
  24. TIMESTAMP

    The TIMESTAMP data type in MySQL is used to store dates and times.
  25. TINYINT

    See signed and unsigned TINYINT ranges, storage size, the BOOLEAN alias, and why TINYINT(1) does not limit values to 0 and 1.
  26. TINYTEXT

    Learn MySQL TINYTEXT’s 255-byte capacity, how multibyte character sets reduce the number of characters, and when VARCHAR fits better.
  27. VARBINARY

    MySQL VARBINARY data type is used to store binary data.
  28. VARCHAR

    Learn MySQL VARCHAR’s character limit, row-size and character-set constraints, storage behavior, and how it differs from CHAR.
  29. YEAR

    The YEAR data type in MySQL is used to store year values.