Oracle的一个简单存储过程

create or replace procedure clearTypes is
c_id integer;
tps varchar(100);
cursor c_1 is
select id, assettypes from folder where assettypes is not null;
begin
 open c_1;
 loop
  fetch c_1 into c_id, tps;
  delete  from cont2flder_1026_2 where folderid = c_id and instr(tps, assettype)=0;
  dbms_output.put_line(c_id);
  commit;
 exit when c_1%notfound;
 end loop;
 close c_1;
end clearTypes;

你可能感兴趣的:(oracle,procedure)