Databases · Junior · Question 10 of 75

Which column type is best for storing money amounts?

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.

Further reading

Problem with a question

Databases · Junior · question 10

Test yourself

Take the Databases · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz