例子4的用处是拷贝表,主要体现了for   ...   Loop,Exception,cursor的用法 
create or replace procedure update_commission
is
CURSOR cur is select * from emp;
begin
for cur_result in cur
loop
begin
insert into emp1(deptno,comm,sal) values(result.deptno,result.comm,result.sal);
end;
end loop;
exception
when others then
null;
end update_commission; 
例子5的用处是拷贝表,主要体现了Loop,fetch   into,exit   when,Exception的用法
create or replace procedure update_commission
is
m_deptno emp.deptno%type;
m_comm emp.comm%type;
m_sal emp.sal%type;
CURSOR cur is select * from emp;
begin
open cur;
loop
fetch cur into m_deptno,m_comm,m_sal;
exit when cur%notfound;
insert into emp1(deptno,comm,sal) values(m_deptno,m_comm,m_sal);
end loop;
close cur;
end update_commission;