Oracle® Database PL/SQL Language Reference 11g Release 2 (11.2) E25519-09 |
|
|
PDF · Mobi · ePub |
The %TYPE
attribute lets you declare a constant, variable, collection element, record field, or subprogram parameter to be of the same data type as a previously declared variable or column (without knowing what that type is). 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:
Data type and size
Constraints (unless the referenced item is a column)
The referencing item does not inherit the initial value of the referenced item.
If the declaration of the referenced item changes, then the declaration of the referencing item changes accordingly.
Name of a collection variable.
Restriction on collection_variable In a constant declaration, collection_variable
cannot be an associative array variable.
Name of a cursor variable.
Name of a database table or view that is accessible when the declaration is elaborated.
Name of a column of db_table_or_view
.
Name of an instance of an ADT.
Name of a record variable.
Name of a field of record_variable
.
Name of a scalar variable.