Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored proc to return multiple rows

Re: Stored proc to return multiple rows

From: DerWoud <derwoud_at_bellsouth.net>
Date: Sun, 31 May 1998 04:10:57 GMT
Message-ID: <lL4c1.3370$AN2.3760633@news3.atl.bellsouth.net>


You could feed the data into a cursor. From there you can return the cursor as a recordset. You could also look at creating a PL/SQL table and returning that table. Building those PL/SQL constructs is pretty easy, returning them is usually the hard part, at least in the ODBC world. DerWoud

T.A.V. wrote in message <357018E4.30B0A0B2_at_sj.bigger.net>...
>1) Can somebody give me some hint how to create a stored procedure to
>return multiple rows from a table.
>For example, i would like my stored procedure returns a result set such
>as :
> select * from XXXX
>
>I 'm using JDBC - Oracle thin driver. I would imagine that I would use
>ResultSet.next() to get the result for each row. Is it possible to do
>that?
>
>2) Can I combine more than 2 statements in a stored procedure such as I
>would like to be able to do:
> select X, Y, Z, COUNT (*) from TABLE_1
> select A, B, C , COUNT(*) FROM table_2
>Can I have only procedure to perform both statements as above?
>
>Many thanks in advance.
>
Received on Sat May 30 1998 - 23:10:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US