Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Optional arguments in procedures?
On Tue, 6 Mar 2001 12:43:35 -0800, "joebob" <joebob_at_zipcon.n0t> wrote:
>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 ..
If you mean PL/SQL procedures, you can define arguments as optional by giving them a default value:
create or replace procedure foo
(
arg1 number, arg2 varchar2 default null, arg3 integer
and in the caller:
foo(arg1 => 10, arg3 => 100);
John
Got an Oracle database question?
Try the search engine for the database docs at:
http://tahiti.oracle.com/
Received on Fri Mar 09 2001 - 02:31:58 CST
![]() |
![]() |