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';

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Oracle PLSQL Procedures And Cursors, SQLDeveloper edition at Code Cupboard.

meta

Follow

Get every new post delivered to your Inbox.