Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Optional arguments in procedures?
"joebob" <joebob_at_zipcon.n0t> wrote in message
news:983911458.228031_at_news.zipcon.net...
> I read the docs and it looks like arguments don't have a way of being
defined as optional. So does that mean that I would use
> conditional statements inside the proc to accomplish the same thing?
Thanks ..
>
> --
> To reply directly, replace the zero in my email address with the letter e.
>
>
>
>
Incorrect.
If you define a default value in the procedure or function definition, the
argument is optional.
create or replace procedure foo (a in varchar2, b in varchar2 default null)
etc
Just FYI, positional syntax is also allowed
foo(b=>'foo',a=>'bar')
Hth,
Sybrand Bakker, Oracle DBA Received on Tue Mar 06 2001 - 14:52:21 CST
![]() |
![]() |