Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 1 (11.1)

B28370-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
PDF · Mobi · ePub

Parameter Declaration

A parameter declaration can appear in in following:

Syntax

parameter_declaration ::=

parameter_declaration
Description of the illustration parameter_declaration.gif

(datatype ::=, expression ::=)

Keyword and Parameter Descriptions

datatype

The data type of the parameter that you are declaring. You cannot constrain this data type (with NOT NULL, for example).

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 index-by table, or a varray to an OUT or IN OUT parameter. IN parameter values are always passed NOCOPY.

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

parameter_name

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

{ := | DEFAULT } expression

Specifies a default 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-7). Otherwise, the parameter is initialized to the value of expression. The value and the parameter must have compatible data types.

Examples

Related Topics