Oracle PLSQL Procedures And Cursors, SQLDeveloper edition
January 29th, 2010 § Leave a Comment
I have a number of PL/SQL procedures that return cursors as out parameters, these are difficult to test outside of PL/SQL Developer and its wonderful Test window. I’ve found a series of commands that can be run as commands in SQLDeveloper (and I hope Sql*plus) to allow cursor parameters to be manipulated.
variable v_your_cursor refcursor;
begin
your_function(p_your_cursor => :v_your_cursor);
end;
/
print :v_your_cursor;
You can add other parameters too. For example a varchar is
variable v_your_character varchar2(255);
execute :v_your_character := 'initial-value';