Examveda

The datatype best suited to store currency values is . . . . . . . .

A. INT

B. FLOAT

C. DOUBLE

D. DECIMAL

Answer: Option D

Solution (By Examveda Team)

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

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous