•When using operators ( + , - , * , and so on) where both operands are integers. 

•You can always store an exact integer value in a BIGINT  column by storing it using a string. In this case, MySQL performs a string-to-number conversion that involves no intermediate double-precision representation. 

•The - , + , and *  operators use BIGINT  arithmetic when both operands are integer values. This means that if you multiply two big integers (or results from functions that return integers), you may get unexpected results when the result is larger than 9223372036854775807 . 

• DECIMAL[( M [, D ])] [UNSIGNED] [ZEROFILL] 

A packed “exact”  fixed-point number. M  is the total number of digits (the precision) and D  is the number of digits after the decimal point (the scale). The decimal point and (for negative numbers) the -  sign are not counted in M . If D  is 0, values have no decimal point or fractional part. The maximum number of digits ( M ) for DECIMAL  is 65. The maximum number of supported decimals ( D ) is 30. If D  is omitted, the default is 0. If M  is omitted, the default is 10. (There is also a limit on how long the text of DECIMAL  literals can be; see Section 12.25.3, “Expression Handling” .) 

UNSIGNED , if specified, disallows negative values. As of MySQL 8.0.17, the UNSIGNED  attribute is deprecated for columns of type DECIMAL  (and any synonyms); you should expect support for it to be removed in a future version of MySQL. Consider using a simple CHECK  constraint instead for such columns. 

All basic calculations ( +, -, *, / ) with DECIMAL  columns are done with a precision of 65 digits. 

• DEC[( M [, D ])] [UNSIGNED] [ZEROFILL] , NUMERIC[( M [, D ])] [UNSIGNED] [ZEROFILL] , FIXED[( M [, D ])] [UNSIGNED] [ZEROFILL] 

These types are synonyms for DECIMAL . The FIXED  synonym is available for compatibility with other database systems. 

• FLOAT[( M , D )] [UNSIGNED] [ZEROFILL] 

A small (single-precision) floating-point number. Permissible values are -3.402823466E+38  to -1.175494351E-38 , 0 , and 1.175494351E-38  to 3.402823466E+38 . These are the theoretical limits, based on the IEEE standard. The actual range might be slightly smaller depending on your hardware or operating system. 

M  is the total number of digits and D  is the number of digits following the decimal point. If M  and D  are omitted, values are stored to the limits permitted by the hardware. A single-precision floating-point number is accurate to approximately 7 decimal places. 

FLOAT( M , D )  is a nonstandard MySQL extension. As of MySQL 8.0.17, this syntax is deprecated, and you should expect support for it to be removed in a future version of MySQL. 

UNSIGNED , if specified, disallows negative values. As of MySQL 8.0.17, the UNSIGNED  attribute is deprecated for columns of type FLOAT  (and any synonyms) and you should expect support for it to be removed in a future version of MySQL. Consider using a simple CHECK  constraint instead for such columns. 

Using FLOAT  might give you some unexpected problems because all calculations in MySQL are done with double precision. See Section B.3.4.7, “Solving Problems with No Matching Rows” . 

