Storing currency values in SQLite3

前端 未结 5 1349
萌比男神i
萌比男神i 2020-12-15 22:26

I\'m dealing with lots of different currencies in my application, and I want to know what the \"best\" way is to store them in an SQLite3 database.

I\'m leaning towa

5条回答
  •  清酒与你
    2020-12-15 22:53

    In financial software currency is always represented as fixed-point (decimal). You can emulate it in SQLite using integers (64-bit integer holds up to 18 digits).

提交回复
热议问题