I have a stored procedure with several cursors. They are defined as IN OUT parameters. I would like to display the result of the cursors using SQL Developer. This is an exampl
Two ways SQL Developer supports this - the GUI and the Code.
The GUI
If you execute your stored procedure from the Code Editor, find the stored procedure in the tree, click on it, use the Execute button - we'll grab ALL of your output, and show it below in the output panels:
And your attempt, the Code:
If you're in the SQL Worksheet and you have your anonymous block, you can run it with F5, including your print command.
Like so -
create or replace function get_emps(dno in number) return sys_refcursor
is
return_value sys_refcursor;
begin
open return_value for
select * from employees where department_id = dno;
return return_value;
end;
/
var rc refcursor
exec :rc := get_emps(90)
print rc