1.

The datatype best suited to store currency values is ______________(a) INT(b) FLOAT(c) DOUBLE(d) DECIMALThe question was posed to me in an interview for internship.Query is from Using Perl DBI in Web Applications in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct option is (d) DECIMAL

Explanation: 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.



Discussion

No Comment Found

Related InterviewSolutions