oracle存储过程循环修改
create or replace procedure updateis
cursor c1 is
select s.id as column1,t.huzhu_name as column2from table1 s,table2 twhere t.id=s.apply_id ;
begin
for r1 in c1 loop
update table1 a set a.huzhu_name=r1.column2 where a.id=r1.column1;
commit;
end loop;
end update;
{:soso__11494044397719366072_2:} {:soso__6565372531573890130_4:} {:soso__6468533990763016983_4:} {:soso__2800774823969466670_4:} {:soso__10338656970872041109_3:} {:soso__10615784733045253186_1:} {:soso__3951476534595763788_1:}
页:
[1]