We will be having an amount/money column which will have decimal values. We would be doing various calculation such as sum, total, fractions etc.,
What would be the best column which can be defined so that we don't end up with any precision issues or rounding issues or missing amount?
Database: MySQL
Option#1 - Decimal(5,2)
Option#2 - Double
Option #3 - Decimal(60,30)
Option #4 - Float
Some suggests go for Decimal and Some says go for Double as Decimal will be an issue on dealing with precisions or chance of missing a minor amount when dealing with millions of transactions
Assume Millions of transactions would be summed, division would be done etc.,
Which would be the best one to go?
Thanks