ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

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
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.