Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Stored Procedures and DEFAULT values for parameters

Re: Stored Procedures and DEFAULT values for parameters

From: Martijn Tonies <m.tonies_at_upscene_nospam_.com>
Date: Mon, 1 Nov 2004 22:50:06 +0100
Message-ID: <10odbmf6c0t63e2@corp.supernews.com>

> > *g* ... ok - so defaults work.
> >
> > However, the Oracle documentation doesn't mention them in CREATE
> PROCEDURE:
> > CREATE [ OR REPLACE ] PROCEDURE [ schema. ]procedure
> > [ (argument [ IN | OUT | IN OUT ]
> > [ NOCOPY ]
> > datatype
> > [, argument [ IN | OUT | IN OUT ]
> > [ NOCOPY ]
> > datatype
> > ]...
> > )
> > ]
> > [ invoker_rights_clause ]
> > { IS | AS }
> > { pl/sql_subprogram_body | call_spec }
> >
> > Where exactly would they fit in?
> >
> > After "datatype"?

>

> Like this:
>

> SQL> create or replace
> 2 procedure p (x in number default 1)
> 3 is
> 4 begin
> 5 dbms_output.put_line('x = '||x);
> 6 end;
> 7 /
>

> Procedure created.
>

> SQL> exec p
> x = 1
>

> PL/SQL procedure successfully completed.
>

> The DEFAULT clause is documented in the PL/SQL Reference since at least
> 8.1.7:

>
>
http://download-west.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/11_elems.htm#11839 >
> ... but NOT in the SQL Reference for some reason, even in the 10G docs!

Indeed. Guess where I looked :-)

>
http://download-west.oracle.com/docs/cd/B12037_01/server.101/b10759/statements_6009.htm#sthref5190

Thanks.

-- 
With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
Received on Mon Nov 01 2004 - 15:50:06 CST

Original text of this message

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