Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored proc to return multiple rows
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
![]() |
![]() |