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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Default parameters...?

Re: Default parameters...?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 14 Nov 2003 10:17:49 -0800
Message-ID: <1068833894.806362@yasure>


Alan Seunarayan wrote:

> Hello all,
>
> Is it possible to have parameters with default values in a stored
> procedure? I know that you can in T-SQL but is it possible in PL/SQL???
>
> Thanks,
>
> Alan
>
>

Defaults have been available in Oracle passed parameters for more than a decade. Check the syntax at http://tahiti.oracle.com

But for an example:

PROCEDURE create_dept (

     new_dname VARCHAR2 DEFAULT 'TEMP',
     new_loc   VARCHAR2 DEFAULT 'TEMP') IS
BEGIN
    INSERT INTO dept

       VALUES (deptno_seq.NEXTVAL, new_dname, new_loc);     ...
END;

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Nov 14 2003 - 12:17:49 CST

Original text of this message

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