shadow2009ty 发表于 2009-10-19 16:35

update时怎么做类型转换

字段是 ton varchar(30,0)
其中的数据如:
5500.000
4000.000
现在想更新使数据除以1000,变成如下:
5.500
4.000
请教如何写SQL

[ 本帖最后由 shadow2009ty 于 2009-10-19 16:37 编辑 ]

yunzhongyue 发表于 2009-10-19 22:35

update table
set ton=TRUNC(ton/1000,4)
where ~

shadow2009ty 发表于 2009-10-20 16:28

回复 #2 yunzhongyue 的帖子

这个函数好用~谢谢~
页: [1]
查看完整版本: update时怎么做类型转换