?
The datatype best suited to store currency values is . . . . . . . .
Answer & Solution
Correct Answer:
Option
D
This question is asking about the best way to store money in a MySQL database.
Here's why the answer is DECIMAL:
* INT is for whole numbers only, not good for amounts with cents.
* FLOAT and DOUBLE are for numbers with decimals, but they can sometimes have rounding errors that are bad for financial calculations.
* DECIMAL is specifically designed for storing precise decimal numbers, making it perfect for currency values.
So the answer is D: DECIMAL
Here's why the answer is DECIMAL:
* INT is for whole numbers only, not good for amounts with cents.
* FLOAT and DOUBLE are for numbers with decimals, but they can sometimes have rounding errors that are bad for financial calculations.
* DECIMAL is specifically designed for storing precise decimal numbers, making it perfect for currency values.
So the answer is D: DECIMAL
Join the Discussion
Login to post a comment or share your explanation.
Login