• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

return value from stored procedure

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an Oracle stored procedure.I need to make a modification to it so that it returns me the value in the variable, which points to a field in the table.
the variable was declared like
pRetVal TABLE_NAME.FIELD_NAME%type
I would like to know how i can return this variable?
Thanks
Gowrishankar
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gowrishankar,
I can't really answer your question -- based on the [lack of] information you have supplied, but allow me to draw your attention to the PL/SQL Technology Center (part of Oracle's OTN Web site).
The information you seek can be found in the Oracle documentation. Specifically, the PL/SQL User's Guide. The two ways to return a value is to either define a stored function (as opposed to a procedure), or to define an "OUT" parameter in a stored procedure. Personally, I prefer to use a stored function.
Good Luck,
Avi.
 
reply
    Bookmark Topic Watch Topic
  • New Topic