Free How to Become an Exceptional DBA eBook with MONEY and SMALLMONEY datatype Question
MSSQL Server is one of the official databases we use at work. I have received an email from a MSSQL Software Tool supplier which touted a free download of How to Become an Exceptional DBA eBook. The catch is I need to answer first a true or false question such as:
Question: The smallmoney datatype is limited to two decimal points
I can remember MSSQL uses both MONEY and SMALLMONEY datatypes for monetary numbers. MSSQL Server keeps track MONEY and SMALLMONEY datatypes up to four decimal places. The only difference between the two is the range of accuracy. MONEY datatype could have about 9 trillion plus and minus range while SMALLMONEY datatype has about 200,000 plus and minus range.
Basically, SMALLMONEY datatype is enough for common monetary values such as salaries. If you need more accuracy then MONEY datatype will take care of that. Cutting it short the correct answer to the above question is:
Answer: False
The consequence of using inappropriate datatype for numeric values can unnecessarily increase the size of the data and indexes. The increase will greatly impact the database performance.
You can visit www.red-gate.com to get your Free How to Become an Exceptional DBA eBook. Good luck!
Posted on
Sunday, February 1st, 2009 at 10:07 am under 