Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC Type Storage (Bytes) Minimum Value Signed Minimum Value Unsigned Maximum Value Signed Maximum Value Unsigned MEDIUMINT 3 -8388608 0 8388607 16777215 INT 4 -2147483648 0 2147483647 4294967295 BIGINT 8 -2 63 0 2$^{63}$-1 2$^{64}$-1 11.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC The  DECIMAL  and  NUMERIC  types store exact numeric data values. These types are used when it is important to preserve exact precision, for example with monetary data. In MySQL,  NUMERIC  is implemented as  DECIMAL , so the following remarks about  DECIMAL  apply equally to  NUMERIC . MySQL stores  DECIMAL  values in binary format. See Section 12.25, “Precision Math” . In a  DECIMAL  column declaration, the precision and scale can be (and usually is) specified. For example: In this example,  5  is the precision and  2  is the scale. The precision represents the number of significant digits that are stored for values, and the scale represents the number of digits that can be stored following the decimal point. Standard SQL requires that  DECIMAL(5,2)  be able to store any value with five digits and two decimals, so values that can be stored in the  salary  column range from  -999.99  to  999.99 . In standard SQL, the syntax  DECIMAL( M )  is equivalent to  DECIMAL( M ,0) . Similarly, the syntax  DECIMAL is equivalent to  DECIMAL( M ,0) , where the implementation is permitted to decide the value of  M . MySQL supports both of these variant forms of  DECIMAL  syntax. The default value of  M  is 10. If the scale is 0,  DECIMAL  values contain no decimal point or fractional part. The maximum number of digits for  DECIMAL  is 65, but the actual range for a given  DECIMAL  column can be constrained by the precision or scale for a given column. When such a column is assigned a value with more digits following the decimal point than are permitted by the specified scale, the value is converted to that scale. (The precise behavior is operating system-specific, but generally the effect is truncation to the permissible number of digits.) 11.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE MySQL permits a nonstandard syntax:  FLOAT( M , D )  or  REAL( M , D )  or  DOUBLE PRECISION( M , D ) . Here,  ( M , D )  means than values can be stored with up to  M  digits in total, of which  D  digits may be after the decimal point. For example, a column defined as  FLOAT(7,4)  is displayed as  -999.9999 . MySQL performs rounding when storing values, so if you insert  999.00009  into a  FLOAT(7,4)  column, the approximate result is  999.0001 . For  FLOAT , the SQL standard permits an optional specification of the precision (but not the range of the exponent) in bits following the keyword  FLOAT  in parentheses; ; that is,  FLOAT( p ) . MySQL also supports this optional precision specification, but the precision value in  FLOAT( p )  is used only to determine storage size. A precision from 0 to 23 results in a 4-byte single-precision  FLOAT  column. A precision from 24 to 53 results in an 8-byte double-precision  DOUBLE  column. The  FLOAT  and  DOUBLE  types represent approximate numeric data values. MySQL uses four bytes for single-precision values and eight bytes for double-precision values. 2017 salary DECIMAL(5,2)