Toad World® Forums

Displaying a OUT parameter and REF cursor at the sametime.

is this possible in toad , to have a procedure that has one OUT paramater and another OUT in the form of a sysref_cursor

procedure may have out parameters as many as you want. I do not see problem.

Maybe if you could show some example so we can help you.

create or replace procedure refcursor_demo (myMsg out VARCHAR2, c out SYS_REFCURSOR)
AS

BEGIN
OPEN c FOR select * from user_tables;
myMsg := ‘Cursor open correctly’;
exception
when others then
myMsg :=‘cursor open failed with ‘|| SQLCODE ||’ code’;
END;

But do not forget to close sys_ref cursor explicitely wehn is not needed!

SQL developer can display an out parameter and another Ref cursor out parameter at the same time.

You need to set the output options.