Re: can a PL/SQL procedure return multiple records ?

From: Scott Urman <surman_at_wwsun10.us.oracle.com>
Date: 21 Nov 1994 18:18:15 GMT
Message-ID: <3aqo97$4cu_at_dcsun4.us.oracle.com>


In article <3ap339$kgs_at_godot.cc.duq.edu>, SYJERRY_at_duq3.cc.duq.edu (Sy Jerry) writes:
|>
|> subject says it all. can I write a PL/SQL procedure (or function)
|> that will return multiple records ? (like a select returns multiple
|> rows)
|>
|> jerry
|>

You can have the procedure return a PL/SQL table. This is sort of like an array - you can bind it from Pro*C with a C array. A PL/SQL table can only be of a scalar type (no arrays of records) so you need one array for each parameter. Check out sample9.pc in the Pro*C Supplement - it does exactly this. Note also that Oracle7 release 7.2 will allow you to pass a cursor variable back from a procedure, which will make this interface much cleaner and more like fetching from a database table. Received on Mon Nov 21 1994 - 19:18:15 CET

Original text of this message