Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Default parameters...?
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') ISBEGIN
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
![]() |
![]() |