隐式游标属性

来源:互联网 发布:京东12g数据库网盘 编辑:程序博客网 时间:2024/05/20 08:22

%found:sql语句影响了一行或多行时为true。

%notfound:sql语句没有影响任何时为true。

%rowcount:sql语句影响的行数。

举例1:

create or replace procedure test

(p_a varchar2,

 p_b integer,             --默认是in参数

 p_c  outsys_refcursor)   --带sys_refcursor输出参数的存储过程

as

begin

 ifp_b=0 then

 openp_c for select rownum*2 as rn from dual connect by rownum<=10;

 else

 openp_c for select rownum*2+1 as rn from dual connect by rownum<=10;

 endif;

end;

/

pl/sql进行调用:直接对过程进行test,输入参数变量值p_a,p_b,过程进行调试,游标输出结果集。
原创粉丝点击