旧的版本,double类型的数据存储不是精确的,例如:
Before MySQL 5.0.3, numbers that are treated as floating-point values produce inexact results: mysql> SELECT .1 + .2 = .3;
+--------------+
| .1 + .2 = .3 |
+--------------+
| 0 |
+--------------+As of MySQL 5.0.3, numbers are used as given when possible: mysql> SELECT .1 + .2 = .3;
+--------------+
| .1 + .2 = .3 |
+--------------+
| 1 |
+--------------+
Before MySQL 5.0.3, numbers that are treated as floating-point values produce inexact results: mysql> SELECT .1 + .2 = .3;
+--------------+
| .1 + .2 = .3 |
+--------------+
| 0 |
+--------------+As of MySQL 5.0.3, numbers are used as given when possible: mysql> SELECT .1 + .2 = .3;
+--------------+
| .1 + .2 = .3 |
+--------------+
| 1 |
+--------------+
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货