(1)
merge into t1
using t2
on (t1.no + 199 = t2.no)
when matched then
update set t1.区县 = t2.区县;
(2)
update /*+ leading(t2) use_hash(t1) */ t1
set 区县 =
(select 区县 from t2 where t1.no + 199 = t2.no);
(3)
至少有一个表的连接列是主键
update (select t1.no, t1.区县 t1a, t2.区县 t2a
from t1
inner join t2
on (t1.tno + 199 = t2.no))
set t1a = t2a;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31402276/viewspace-2127333/
,如需转载,请注明出处,否则将追究法律责任。