declare
cursor abc(a number) is select * from classA;
rec abc%rowtype;
n number(5);
begin
n:=&n;
open abc(n);
loop
fetch abc into rec;
if n=rec.no
then
insert into classB values(n,rec.name);
end if;
exit when abc%notfound;
end loop;
end;
No comments:
Post a Comment