存储过程与游标的问题
请问:如果存储过程有个游标变量做为输出参数.该如何调用.如何进行测试!希望大虾们赐教..!感激不敬~
------解决方案--------------------CREATE OR REPLACE PROCEDURE ll_02 (p_cursor OUT sys_refcursor) IS
v_sql varchar2(50);
BEGIN
v_sql:= 'SELECT * from ' || 'b_areas where area_id> ' 'A ' ' ';
OPEN p_cursor FOR
v_sql;
END ll_02;
/
--toad test
declare
v_c sys_refcursor;
v_r b_areas%rowtype;
begin
ll_02(v_c);
LOOP
FETCH v_c INTO v_r;
dbms_output.put_line(v_r.area_id) ;
EXIT WHEN v_c%NOTFOUND;
END LOOP;
end;