| Oracle® Database PL/SQL Language Reference 11g Release 2 (11.2) Part Number E17126-03 |
|
|
View PDF |
The %ROWTYPE attribute lets you declare a record that represents either a full or partial row of a database table or view. For every column of the full or partial row, the record has a field with the same name and data type. If the structure of the row changes, then the structure of the record changes accordingly.
The record fields do not inherit the constraints or initial values of the corresponding columns.
Topics:
Syntax

Semantics
explicit_cursor_name
The name of an explicit cursor. For every column selected by the query associated with the cursor, the record has a field with the same name and data type.
cursor_variable_name
The name of a strong cursor variable. For every column selected by the query associated with the cursor variable, the record has a field with the same name and data type.
db_table_or_view_name
The name of a database table or view that is accessible when the declaration is elaborated. For every column of the table or view, the record has a field with the same name and data type.
Examples
Example 5-36, "%ROWTYPE Variable that Represents Full Database Table Row"
Example 5-37, "%ROWTYPE Variable Does Not Inherit Initial Values or Constraints"
Example 5-38, "%ROWTYPE Variable that Represents Partial Database Table Row"
Example 5-41, "Assigning %ROWTYPE Record to RECORD Type Record"
Related Topics
In this chapter:
In other chapters: