oracle developer中调用返回游标的过程,该怎么解决

oracle developer中调用返回游标的过程例如:过程createorreplaceproceduresp_test(v_aint,v_cursys_refcur

oracle developer中调用返回游标的过程
例如:过程
create   or   replace   procedure   sp_test
(v_a   int,
v_cur   sys_refcursor)
as

begin
    if   Nvl(v_a,   0)   =   0   then
    open   cursor   for   select   *   from   test1;
    end   if;
end;

如何在oracle   developer中调用该过程

[解决办法]
注意:在下面FETCH INTO的时候,必须写清楚字段和它对应的变量名,不然Oracle自己识别不出来*的内容:

SQL code
set serveroutput on;declare col1 varchar2(10); col2 varchar2(10); M sys_refcursor;begin  sp_test (0, M);  fetch M into col1, col2;  DBMS_OUTPUT.PUT_LINE(col1);  DBMS_OUTPUT.PUT_LINE(col2);  close M;end;