MySQL Data Types

MySQL supports multiple data types, and this page summarizes the common data types in MySQL.

  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

    BLOB is a data type in MySQL used for storing large amounts of binary data.
  5. BOOLEAN

    The MySQL BOOLEAN data type is used to store boolean values, which can be TRUE or FALSE.
  6. CHAR

    CHAR is a data type in MySQL used for storing fixed-length string data.
  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

    The MySQL DOUBLE data type is used to store double-precision floating-point numbers, which are 64-bit (8-byte) IEEE floating-point numbers.
  11. ENUM

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

    FLOAT is a numeric data type in MySQL used to store single-precision floating-point numbers (4 bytes).
  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

    In MySQL, the JSON data type allows users to store and process data in JSON format.
  17. LONGTEXT

    MySQL LONGTEXT is a data type used to store longer text data.
  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

    MySQL MEDIUMTEXT is a data type used to store medium-length text data.
  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

    In MySQL, the TEXT data type is used to store longer text strings.
  23. TIME

    The TIME data type in MySQL is used to store time values, including hours, minutes, seconds, and milliseconds.
  24. TIMESTAMP

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

    MySQL TINYINT is a data type used for storing small integers.
  26. TINYTEXT

    The MySQL TINYTEXT data type is a data type used to store short text, with a maximum limit of 255 characters.
  27. VARBINARY

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

    VARCHAR is one of the data types in MySQL used for storing string type data.
  29. YEAR

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