Which datatype is best suited to store currency values?
(a) INT
(b) FLOAT
(c) DOUBLE
(d) DECIMAL
(a) INT
(b) FLOAT
(c) DOUBLE
(d) DECIMAL
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Right option is (d) DECIMAL
For explanation I would say: Currency is a numeric information. For monetary calculations, FLOAT and DOUBLE are subject to rounding error and may not be suitable. A DECIMAL(M, 2) type is best suited for it.