Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: About Return more tables from a PL/SQL procedure
try a procedure with OUT parameters instead of a function, they (OUT
parameters) can be many:
I define cursors types in a package:
TYPE c1 IS REF CURSOR; TYPE c2 IS REF CURSOR;
END Cd;
Then I create a procedure with 2 OUT parameters which are cursors:
BEGIN OPEN c1_out FOR 'SELECT object_id, object_name from all_objects'; OPEN c2_out FOR 'SELECT table_name from all_tables';
END P;
And then I run the procedure p from e.g. a block:
c1 Cd.c1; c2 Cd.c2;
Jan
michaelwah_at_tom.com.hk (Michael) wrote in message news:<57aa0935.0407080245.3cbd3d8d_at_posting.google.com>...
> I am converting some Stored Procedure from T-SQL to PL/SQL.
>
> The T-SQL procedure return many table from database,
> and it is called from JDBC.
> how can PL/SQL do something like this ??
>
> Most of examples on web using a PL/SQL function which
> return a REF CURSOR, but this can only return one table.
>
> Thanks for your help.
Received on Thu Jul 08 2004 - 09:28:30 CDT
![]() |
![]() |