Numeric Data Types in MySQL

Q

What Are Numeric Data Types in MySQL?

✍: 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 in MySQL

Difference between BINARY and VARBINARY in MySQL

Introduction to SQL Basics in MySQL

⇑⇑ MySQL Database Tutorials

2018-01-19, 1461🔥, 0💬