oracle中, 怎样修改一条记录中一个列字段中的某一位值如:列:BOOK_ID=20022100 把第一位数值2修改位B?

如题所述

update 表名 set 字段名=stuff(字段名,开始下标,修改就位,'内容') where 条件
如update a set id=stuff(id,1,1,'b') where substring(id,1,1)='2'
如修改第六位到第8位:update a set id=stuff(id,6,2,'ab') where substring(id,6,2)='22'
温馨提示:答案为网友推荐,仅供参考
相似回答