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: PL/SQL tables

Re: PL/SQL tables

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 26 Nov 1999 16:46:23 -0500
Message-ID: <dtvt3so132ltl22hecfsloo6t3n8m4hmh1@4ax.com>


A copy of this was sent to ironbeak_at_hotmail.com (if that email address didn't require changing) On Fri, 26 Nov 1999 18:08:23 GMT, you wrote:

>Hi
>
> I am using Oracle 7. For the parameters to a PL/SQL procedure I can
>set varchar2, pls_integer, etc to default NULL so I don't have to pass
>that parameter to the procedure. Is there a equivilent for the table
>datatype or a way to get the same behavior? If yes, how do I do this?
>
>for example in
>
>procedure test (
> iprocID in varchar2 default NULL <-- anyway to do this for
>a table
>);
>
> Any answer (yes/No) would be appreaciated.
>

the answer is yes. you would do something like this:

create or replace package my_package
as

   type myTableType is table of varchar2(20) index by binary_integer;

   emptyArray myTableType;

   procedure foo( x in myTableType default my_package.emptyArray ); end;
/

>Thanks for your time
>Jan
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Nov 26 1999 - 15:46:23 CST

Original text of this message

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