Re: Parameter Order

From: <sybrandb_at_hccnet.nl>
Date: Mon, 04 Aug 2008 21:43:22 +0200
Message-ID: <0qme945un37f8bb8jsvjt8037f32eetg72@4ax.com>


On Mon, 4 Aug 2008 10:29:37 -0700 (PDT), artmerar_at_yahoo.com wrote:

>
>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??

exec a(1,2) -- p3 and p4 get defaults
exec a(1,2,3)  -- p4 gets a default
exec a(1,2,p4=>3) -- p3 gets a default

Note: once you start using positional syntax (parametername=> value) you must CONTINUE using positional syntax.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Mon Aug 04 2008 - 14:43:22 CDT

Original text of this message