MySQL supports a variety of data types to support and store different kind of data and to perform different operations on it.

Supported data types can be majorly categorized into following types:

Numeric Types

Numeric types consist of all the major numeric types to support all kind of numerical data, which may be signed or unsigned (except BIT type).

Following numeric types are accepted:

  • Integer:
    • INTEGER: It is the same as INT, used to store 4 Byte of data.
    • INT: It is used to store 4 Bytes of data.
    • SMALLINT: It is used to store 3 Bytes of data.
    • TINYINT: It is used to store single Byte of data.
    • MEDIUMINT: It is used to store 3 Bytes of data.
    • BIGINT: It is used to store 8 Bytes of data.
    • SERIAL: It is used as an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.
  • Fixed Point:
    • DECIMAL: It is used to define precision of number as how many significant numbers to stored and how many after decimal points.
    • NUMERIC: It is use as equal to DECIMAL.
  • Floating Point:
    • FLOAT: It is used to store approximate numbers having defined number of values after decimal point.
    • DOUBLE: It is used as a REAL (FLOAT) number with double precision, referring to the decimal rounding function.
  • Bit Value:
    • BIT: It is used to store bit values.