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

Part Number E25519-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
LNPLS01352

%TYPE Attribute

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:

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.

LNPLS1853Topics

Syntax

LNPLS1350type_attribute ::=

Description of type_attribute.gif follows
Description of the illustration type_attribute.gif

Semantics

LNPLS1351collection_variable

Name of a collection variable.

LNPLS1854Restriction on collection_variable  In a constant declaration, collection_variable cannot be an associative array variable.

LNPLS1352cursor_variable

Name of a cursor variable.

LNPLS1353db_table_or_view

Name of a database table or view that is accessible when the declaration is elaborated.

LNPLS1855column

Name of a column of db_table_or_view.

LNPLS1354object

Name of an instance of an ADT.

LNPLS1355record_variable

Name of a record variable.

LNPLS1356field

Name of a field of record_variable.

LNPLS1357scalar_variable

Name of a scalar variable.

Examples

Related Topics

LNPLS1856In this chapter:

LNPLS1857In other chapters:

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF