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 -> problems with default parameter values

problems with default parameter values

From: kevin Sedota <sedotatx1_at_comcast.net>
Date: Wed, 4 Aug 2004 17:44:19 -0700
Message-ID: <BqudnVz3xYUa-ozcRVn-pw@comcast.com>


using Oracle 10g (maybe others, I don't know) Writing Stored procs which have default values.

I had a bunch of code that had parameter definitions that looked like:

    p1 in varchar2 := null,
    p2 in number := null

These worked fine when the parameter was a varchar but for anything else it would not work. I'm not sure what was being passed. However if I coded

    p1 in varchar2 DEFAULT null,
    p2 in number DEFAULT null

everything worked fine. The documentation states that := should be use for defining default numerics. something like

    p2 in number := 7

which would seem to imply that null in place of 7 should be ok. But it's not.

Is this an error in the documentation?

thanks

kjs Received on Wed Aug 04 2004 - 19:44:19 CDT

Original text of this message

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