$ ./guess_the_languageSQL & Databases
SQL & Databases · medium · #36

Which column type is the safest choice for storing money amounts?

  1. DOUBLE PRECISION
  2. REAL
  3. FLOAT(24)
  4. DECIMAL(12,2)
Binary floating point can't represent values like 0.10 exactly; fixed-point DECIMAL/NUMERIC avoids rounding drift.
Play SQL & Databases ▸