mik-t mik-t - 29 days ago 9
SQL Question

In a currency exchange rate what is the maximum number of decimal places used?

I need to store currency exchange rate data in the SQL 2008 database.
I would like to keep rate as a

decimal
data type in the database.

One thing I am not sure about, is how many decimal places to give (e.g. decimal(18, ?)).

Since, I will be using this service as a source: http://openexchangerates.org/latest.json. There, it seems that the highest number of decimal places used is '6'.

Is that the right number, or there possibly can be rates with more than 6 decimal places?

Answer Source

I once worked on an international financial C# based package, which had to support numerous currencies, and we supported 6 decimal places. We had a couple of very experienced designers who told us that would be sufficient.