根据B表更新A表解决思路
根据B表更新A表

基本意思就是要实现如果 A.字段2=B.字段2 那么就将B.id 更新到A.字段2 中
单条数据倒是听好弄 本人也会
但是一牵扯循环更新就头大了。
还请各位路过的高仙支支招吧
------解决方案--------------------
merge轻松搞定
------解决方案--------------------
你想多了
------解决方案--------------------
update t1 a set a.co1=decode((select b.id from t2 b where b.col=a.co1),null,a.co1,(select b.id from t2 b where b.col=a.co1))
基本意思就是要实现如果 A.字段2=B.字段2 那么就将B.id 更新到A.字段2 中
单条数据倒是听好弄 本人也会
但是一牵扯循环更新就头大了。
还请各位路过的高仙支支招吧
------解决方案--------------------
merge轻松搞定
------解决方案--------------------
你想多了
update A表 a set 字段2=(select b.id from B表 b where b.字段2=a.字段2)
------解决方案--------------------
update t1 a set a.co1=decode((select b.id from t2 b where b.col=a.co1),null,a.co1,(select b.id from t2 b where b.col=a.co1))