我想在mysql数据库中存储一个双精度数字(来自objective-c的[NSDate timeIntervalSinceReferenceDate]返回值)。
查询似乎执行正常,但是当我执行选择查询时,它返回1.00000
我不知道为什么。我搜索了网络上的线索,很多人提出但没有解决我的问题。
你们能帮忙吗?
更新查询
update tblPurchased
set
sync = '429568293.63687'
and consumablecount = 0
where
id = 2;
来自mysql workbench的结果
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'
答案 0 :(得分:2)
我需要学习如何编写更新查询...
update tblPurchased
set
sync = '429568293.63687'
and consumablecount = 0
where
id = 2;
应该是
update tblPurchased
set
sync = 429568293.63687,
consumablecount = 0
where
id = 2;