update table1
set
f2=(select table2.f2 from table1,table2 where table1.f1=table2.f1)
where f1=(select table2.f1 from table1,table2 where table1.f1=table2.f1);
set
f2=(select table2.f2 from table1,table2 where table1.f1=table2.f1)
where f1=(select table2.f1 from table1,table2 where table1.f1=table2.f1);
set f2 = ( select f2 from table2 B where B.f1 = A.F1)
where A.f1 in ( select f1 from table2);
如果是记录集,还是写过程吧。
set
f2=(select table2.f2 from table2 where table1.f1=table2.f1 and rownum=1)
where exists(select table2.f1 from table2 where table1.f1=table2.f1);
(select f2 from table2 where table1.f1=table2.f1 and rownum=1)
where exists (select 1 from table2 where f1=table1.f1);