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: procedure with optional parameter

Re: procedure with optional parameter

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Tue, 14 Jan 2003 16:46:57 GMT
Message-ID: <5aXU9.527$%p7.27424798@newssvr15.news.prodigy.com>


bart wrote:
> hellow,
>
> How can I create a pl/sql procedure with optional parameters?
>
> so I can call the procedure without passing all the values?
>
> thx
>
>

create or replace procedure x (

   normal_param in number,
   optional_param in number := 999
) ...

You can call it as:

x(15,20) -- will make optional_param = 20 x(15) -- will default optional_param = 999

Optional parameters have to be the final parameter(s). Received on Tue Jan 14 2003 - 10:46:57 CST

Original text of this message

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