storing money in decimal fields in MySQL
I haven’t found a lot of advice about what precision values to use for storing money in decimal fields. Here’s what I calculated. The scale is going to be 2 for US currency which requires 1 byte of storage. precision 4, scale 2 = 2 bytes of storage, 99.99 to -99.99 precision 6, scale 2 …
Continue reading ‘storing money in decimal fields in MySQL’ »