ORACLE游标与异常处理
过程示例
create or replace procedure Testis cursor mycusor(p_firm_code varchar2) is select id from store_in_list where firm_code=p_firm_code and rownum<10 order by eml_id ; myrecord mycusor%rowtype;begin --显示游标循环 open mycusor('4403447904'); loop fetch mycusor into myrecord.id; exit when mycusor%notfound; DBMS_OUTPUT.put_line(myrecord.id); end loop; close mycusor; end;
?