oracle update问题

来源:百度知道 编辑:UC知道 时间:2024/09/25 06:31:08
update table set ckh=01 where bm like '01%'
我想把ckh字段里面的值更新为01,但是运行上面语句后,ckh都更改为1。这是怎么回事?请帮帮忙!

改为
update table set ckh='01' where bm like '01%'

01是数字 而不是varchar型啊 如果要更新为01 要把字段 ckh改为 varchar

你的ckh是number类型的 换成vachar2型就可以了
update table set ckh='01' where bm like '01%'