Data types in MySQLNumeric Type
Decimal( Precission, Scale )Precission : Number of Significant digitsScale : 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 totalD : 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 totalD : 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 totalD : Digits after decimal Example : value REAL(5,2) Here we can insert data in range of -999.99 to 999.99
This article is written by plus2net.com team.
![]() ![]() | ||||||||||||||||||||||||||||||||||||