Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i return a result set from a stored procedure in oracle ?
suppose i want to return a table from a simple select statement such as this :

Select * from tblTest

I tried this but this seems plain wrong!

PROCEDURE ProcSelectEveryThing(cursor_ OUT TYPES.REF_CURSOR)


OPEN cursor_ FOR
      SELECT * FROM "tblTest"; 

what is wrong?

share|improve this question

You're missing a RETURN statement in your PL/SQL. Check out the answer here. There are any number of sites which can provide a quick response to this query. I recommend that you download SQLDeveloper and look at some of the system supplied stuff and check out the docco, starting here. SQLDeveloper is really great - and it's free!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.