Default size of datatype float in mysql - phpmyadmin
12,086
As mysql manual on float says:
For maximum portability, code requiring storage of approximate numeric data values should use FLOAT or DOUBLE PRECISION with no specification of precision or number of digits.
No length is the default length value.
However, if you do specify length, then mysql will round the float to the number of decimals specified. See the documentation linked above for more details:
For example, a column defined as FLOAT(7,4) will look like -999.9999 when displayed. MySQL performs rounding when storing values, so if you insert 999.00009 into a FLOAT(7,4) column, the approximate result is 999.0001.
Author by