我想在mysql数据库中存储一个 double 字([NSDate timeIntervalSinceReferenceDate]从objective-c返回值)。
该查询似乎执行得很好,但是当我执行选择查询时,它返回 1.00000。
我不知道为什么。我在网上搜索线索,出现了很多线索,但没有一个解决我的问题。
你们能帮忙吗?
更新查询
update tblPurchased
set
sync = '429568293.63687'
and consumablecount = 0
where
id = 2;
来自 mysql 工作台的结果
22:52:09 update tblPurchased set sync = '429568293.63687' and consumablecount = 0 where id = 2 0 row(s) affected Rows matched: 1 Changed: 0 Warnings: 0 0.003 sec
或
22:58:25 update tblPurchased set sync = 429568293.63687 and consumablecount = 0 where id = 2 0 row(s) affected Rows matched: 1 Changed: 0 Warnings: 0 0.003 sec
描述表格
'sync', 'decimal(15,5)', 'NO', '', '0.00000', ''
选择查询的结果
"id", "sync"
'2', '1.00000'
最佳答案
我需要学习如何编写更新查询...
update tblPurchased
set
sync = '429568293.63687'
and consumablecount = 0
where
id = 2;
应该是
update tblPurchased
set
sync = 429568293.63687,
consumablecount = 0
where
id = 2;
关于mysql - 存储 mysql 浮点值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25273724/