支持OPEN-FOR-USING语句
CREATE OR REPLACE PROCEDURE testatlasdb()
is
cur_vv refcursor;
v_id int;
BEGIN
open cur_vv for 'select id from at_tb2 where id=:a' using 1;
loop
fetch cur_vv into v_id;
exit when cur_vv%NOTFOUND;
raise notice '%', v_id;
end loop;
close cur_vv;
return;
END;
/