oracle存储过程游标遍历

前端之家收集整理的这篇文章主要介绍了oracle存储过程游标遍历前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
create or replace procedure PRO_GETYFBGYZB(jgidInput  in varchar2,yfsbInput  in varchar2 --输入变量
                                    ) as
  cursor cursorParam is select a.ypxh as YPXH,a.YPCD,a.ypsl,b.yfgg,a.lsje   
    from yf_kcmx a,yf_ypxx b
   where a.jgid = b.jgid
     and a.yfsb = b.yfsb
     and a.ypxh = b.ypxh
     and a.jgid = jgidInput
     and a.yfsb = yfsbInput;
begin
     DBMS_OUTPUT.ENABLE( 1000000);
     for temp in cursorParam
     Loop
     dbms_output.put_line( '药品序号:' || temp.ypxh);
     end Loop ;
end PRO_GETYFBGYZB;

猜你在找的Oracle相关文章