Data types in MySQL

Numeric Type
FieldStorage
Bytes
Min SignedMin UnSignedMax SignedMax UnSigned
Tnyint1-1280127255
Smallint2-3276803276765535
Mediumint3-83886080838860716777215
Int4-2147483648021474836474294967295
Bigint8-2630263264

Decimal( Precision, Scale )

Precision : Number of Significant digits
Scale : Number digits after decimal point.

Example : Price DECIMAL(5,3)

Here Maximum Price ( value ) we can store is -99.999 to 99.999
Decimal is used where exact and accurate value is to be stored like monetary values.

FLOAT ( M,D)

M : Digits in total
D : Digits after decimal

Example : average_value FLOAT(4,2)

Here we can insert data in range of -99.99 to 99.99
Float is 32 bit single precision.

DOUBLE (M, D)

M : Digits in total
D : Digits after decimal

Example : value FLOAT(5,2)

Here we can insert data in range of -999.99 to 999.99
Double is 64 bit double precision.

REAL (M, D)

M : Digits in total
D : Digits after decimal

Example : value REAL(5,2)

Here we can insert data in range of -999.99 to 999.99

Numeric Datatypes Date Datatypes Boolean Blob
Create table Copy table List Tables and Databases
What is SQL Installation of Database Managing MySQL
Subscribe to our YouTube Channel here



plus2net.com










SQL Video Tutorials










We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer