Hacker News new | ask | show | jobs
by theprotocol 3289 days ago
Decimal, because it's straightforward. I prefer to err on the side of minimizing computations and manipulations involving price, and simple things are easier to add complexity to later if the need arises compared to the other way around.

+ https://dev.mysql.com/doc/refman/5.7/en/fixed-point-types.ht...

>The DECIMAL and NUMERIC types store exact numeric data values. These types are used when it is important to preserve exact precision, for example with monetary data. In MySQL, NUMERIC is implemented as DECIMAL, so the following remarks about DECIMAL apply equally to NUMERIC.