Oracle Tip: Execute Stored Procs with Ref.Cursors

The other day at work while I was troubleshooting a problem I needed to execute a stored proc that used a IN/OUT ref cursor. I had never did this before. So after spending some time googling, I figured out it is not as complicated after all. So here it goes for all those people who are looking to do the same:

variable myVar refcursor;

exec(ute) my_store_proc_name(‘param1′,’param2′,’param3’,……,:myVar);

print myVar;

Hope this helps out…..

21 comments for “Oracle Tip: Execute Stored Procs with Ref.Cursors

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.