Re: Parameter Order

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Mon, 4 Aug 2008 19:54:31 +0200
Message-ID: <48974283$0$49843$e4fe514c@news.xs4all.nl>

<artmerar_at_yahoo.com> schreef in bericht news:eddc2e8e-3078-4cd2-8d4c-bd76ddfde3f1_at_8g2000hse.googlegroups.com...
>
> This one is probably simple.......if I have a procedure where I pass a
> number of parameters, and some of those have default values, what if
> not all of the parameters have values?
>
> Here:
>
> PROCEDURE A (
> P1 NUMBER,
> P2 VARCHAR2,
> P3 NUMBER DEFAULT 99,
> P4 VARCHAR2 DEFAULT 'X') IS
>
> Now, what if when PROCEDURE A is called, it only has P1, P2 &
> P4......what gets passed for P3 since they are in a specific order,
> NULL??
>

Call the procedure like this

A (p1=> yourvalueforp1, p2 => yourvalueforp2, p4 => yourvalueforp4);

In 11g I think it is even allowed to mix it like

A (yourvalueforp1, yourvalueforp2, p4 => yourvalueforp4);

Shakespeare Received on Mon Aug 04 2008 - 12:54:31 CDT

Original text of this message