哪种类型(浮点型或十进制)最适合在 mysql 数据库中存储价格?
Which type (Float or decimal) is best used to store prices in a mysql database?
浮点数不精确,会引入累积舍入误差.十进制是财务信息必须准确的最佳格式.
Floats are not exact and can introduce cumulative rounding errors. Decimal is the best format for financial information that must be exact.
这篇关于价格是浮点数还是小数点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!