What Are Numeric Data Types

Q

What Are Numeric Data Types? - MySQL FAQs - Introduction to SQL Basics

✍: FYIcenter.com

A

MySQL supports the following numeric data types:

  • BIT(n) - An integer with n bits.
  • BOOL same as BOOLEAN - Boolean values stored in 1 bit.
  • TINYINT - A small integer stored in 1 byte.
  • SMALLINT - A small integer stored in 2 bytes.
  • MEDIUMINT - A medium integer stored in 3 bytes.
  • INT same as INTEGER - An integer stored in 4 bytes.
  • BIGINT - An integer stored in 8 bytes.
  • FLOAT - A single-precision floating-point number stored in 4 bytes.
  • DOUBLE same as DOUBLE PRECISION - A double-precision floating-point number stored in 8 bytes.
  • REAL - Same DOUBLE by default.
  • DECIMAL(m,d) - A fixed-point number with m as the precision (total number of digits) and d as the scale (number of digits after the decimal point).
  • Date and Time Data Types - DATE, DATETIME, TIMESTAMP, TIME, YEAR.
  • 2007-05-11, 4942👍, 0💬