Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

Parameter-Passing Notation

Formal parameters are the names that are declared in the header of a procedure or function. Actual parameters are the values or expressions placed in the parameter list when a procedure or function is called.

PL/SQL lets you use either of two styles of notation for passing arguments in parameter lists:

Positional notation

Associates each value in the list of arguments supplied in the program call with the parameter in the corresponding position. This is the default.

Named notation

Explicitly associates the argument value with its parameter by name, not by position. When you use named notation, you can supply the arguments in any order, and you can skip over IN arguments that have default values.

The call to the empid_to_name procedure is shown here with both types of notation:

BEGIN
   -- Implicit positional notation. 
   empid_to_name(10, surname, first_name);
 
   -- Explicit named notation. 
   empid_to_name(in_id=>10 
      ,out_last_name=>surname 
      ,out_first_name=>first_name);
END;

You can combine positional and named notation. Just make sure that positional arguments appear to the left of any named notation arguments. When calling PL/SQL stored functions from SQL, named notation is not supported.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page