MySQL Decimals

Decimals can be added to a MySQL database by using the DECIMAL(M,D) data type. This requires 2 arguments.

M is the maximum number of digits, ranging from 1 to 65.
D is the number of decimal places available, ranging from 0 to 30.
Note that with D digits reserved for decimal places, there can be at most M-D digits available for the integer part. So if we use DECIMAL(6,4), the number 45.8239 would be valid, but 456.12 would not.