MySQL: preferred column type for (product) prices?

前端 未结 5 1916
你的背包
你的背包 2021-01-30 19:34

In MySQL, what is the preferred column type for storing a product\'s price (or currencies in general)? Google learned me DECIMAL of FLOAT is often used, but I wonder which one i

5条回答
  •  孤街浪徒
    2021-01-30 20:08

    I prefer INT (price multipled by 100) which solves floating point problem in other software.

提交回复
热议问题