Databases · Junior · Question 10 of 75
Which column type is best for storing money amounts?
- 1
text - 2
realordouble precision - ✓Correct answer:
numeric(exact decimal) or an integer number of cents
Explanation
Floating-point types can't represent values like 0.1 exactly, so sums drift. numeric is exact; storing cents in bigint is also common.