ref cursor type
Hello All,
I have a small procedure like the following.
CREATE OR REPLACE procedure PROC_DEPT_SALE(SALEC_CUR out sys_refcursor)
as
begin
open sale for select * from dept_sale where dept_no='Z2341324';
end;
/
I just want to execute it from toad like
exec PROC_DEPT_SALE( C1);
In order to do that i need to have a sys_refcursor c1 created in my DB. I know that i can execute it as a plsql block like this
DECLARE
SALE SYS_REFCURSOR;
BEGIN
PROC_DEPT_SALE( SALE );
END;
Could anyone please let me know how can i create a TYPE REF cursor which is permanantly stored in the DB and then execute the proc the way i wanted to using the first statement.
Thanks