1.

The datatype best suited to store currency values is __________(a) INT(b) FLOAT(c) DOUBLE(d) DECIMALThis question was addressed to me in an interview for internship.My question is based upon PHP Overview topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct ANSWER is (d) DECIMAL

The EXPLANATION is: 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