Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: procedure returning 2 rows
On 26 Jan 2007, dazed_confused_lost_at_hotmail.com wrote:
> I am stuck. Yes I have read the documentation. I was not able to
> memorize it though. I have searched google, asktom, oracle.com and my
> bookshelf of books on Oreilly safari and many google group posts. I
> am still stuck.
>
> Could someone kindly post a Oracle 9i PL/SQL example that simply
> SELECTs 2 rows from a table and then displays those rows? Also please
> include the syntax needed to call the procedure and display those 2
> damn rows.
In Oracle, you'll find that procs are used more for doing tasks, not selecting data. But, you use ref cursors to do your task.
In SQLServer and Sybase and others, procs make that easy. But that ease comes with a cost. Programatic access to a proc that might or might not return a result set is hard to deal with as your codebase grows. In Oracle, you have to explicitly state what you might return. This is a godsend when building apps.
> I will run it in toad or sqlplus.
>
> A complete full example would include 2 more things.
> create table statement (separate from procedure)
> insert statement (inserting 2 rows) (also separate from procedure)
The create table statement is something you could provide for making it easier for someone to help you.
The insert statement is something you could provide to make it easier for someone to help you.
> I need a full working example, not a link to a another website.
You come across like your problem is caused by the audience of your post.
-- Galen BoyerReceived on Sat Jan 27 2007 - 10:23:01 CST
![]() |
![]() |