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

%TYPE Attribute

The %TYPE attribute lets you declare a constant, variable, array element, record field, or subprogram parameter to be of the same data type a previously declared variable, field, record, nested table, or database column. The item declared with %TYPE is the referencing item, and the previously declared item is the referenced item.

The referencing item inherits the following from the referenced item:

The referencing item does not inherit the initial value of the referenced item.

If the declaration of the referenced item changes, the declaration of the referencing item changes accordingly.

Topics:

Syntax

%type_attribute ::=

type_attribute
Description of the illustration type_attribute.gif

Semantics

collection_name

The name of a collection.

cursor_variable_name

The name of a cursor variable. Only the value of another cursor variable can be assigned to a cursor variable.

object_name

The name of an instance of an ADT.

record_name

The name of a record.

field_name

The name of a record field.

db_table_name

The name of a database table that is accessible when the declaration is elaborated.

column_name

The name of a column of a database table.

variable_name

The name of a variable.

Examples

Related Topics

In this chapter:

In other chapters: