Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)

Part Number E10472-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Parameter

A parameter declaration can appear in in following:

Topics:

Syntax

parameter_declaration ::=

parameter_declaration
Description of the illustration parameter_declaration.gif

See:

Semantics

parameter_name

The name of the formal parameter that you are declaring, which you can reference in the body of the subprogram.

IN, OUT, IN OUT

Parameter modes that define the action of formal parameters. For summary information about parameter modes, see Table 8-1.

Note:

Avoid using OUT and IN OUT with functions. The purpose of a function is to take zero or more parameters and return a single value. Functions must be free from side effects, which change the values of variables not local to the subprogram.

NOCOPY

Specify NOCOPY to instruct the database to pass this argument as fast as possible. This clause can significantly enhance performance when passing a large value like a record, an associative array, or a varray to an OUT or IN OUT parameter. IN parameter values are always passed NOCOPY.

These effects might not occur on any particular call. Use NOCOPY only when these effects would not matter.

datatype

The data type of the parameter that you are declaring.

Restriction on datatype You cannot constrain this data type (with NOT NULL, for example).

expression

Specifies an initial value for an IN parameter. If the invoker of the subprogram specifies a value for the parameter, then expression is not evaluated for that invocation (see Example 8-8). Otherwise, the parameter is initialized to the value of expression. The value and the parameter must have compatible data types (see Table 3-10, "Possible Implicit PL/SQL Data Type Conversions").

Examples

Related Topics

In this chapter:

In other chapters: