- tableName: tb_assets
- columnName: free
- columnType: decimal(32,16)
- sql-1: update tb_assets set free = 16224.0221121221736466 where id=6;
- sql-2: update tb_assets set free = free + '100000000' where id=6;
- after sql-1: fee: 16224.0221121221736466
- after sql-1&sql-2: fee: 100016224.0221121200000000
- compare: fee: 16224.0221121221736466 fee: 100016224.0221121200000000 100016224(after sql-2 executed,Integer part.loss precision with integer's digits - 1)
please help me understand why the decimal part will lose precision.
Explanation about why a decimal type column added with a string in Mysql, it will lose precision.
I wanna know what is the detail when execute the sql "update tb_assets set free = free + '100000000' where id=6;"