|Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)
Part Number E17126-03
A record variable is a composite variable whose internal components, called fields, can be of different data types. The value of a record variable and the values of its fields can change.
You reference an entire record by its name. You reference a record field with the syntax
You can create a record variable in any of these ways:
Define a record type and then declare a variable of that type.
%ROWTYPE to declare a record variable that represents either a full or partial row of a database table or view.
%TYPE to declare a record variable of the same type as a previously declared record variable.
The name of the record type that you are defining.
The name of the field that you are declaring.
The data type of the field that you are declaring.
NULL constraint on the field. For information about this constraint, see "NOT NULL Constraint".
An expression whose value has a data type compatible with
record_variable_declaration is elaborated, the value of
expression is assigned to
field_name. This value is the initial value of the field.
The name of the record variable that you are declaring.
The type of the record variable that you are declaring—a previously defined record type.
See "%ROWTYPE Attribute".
The name of a previously declared record variable.
See "%TYPE Attribute".
In this chapter:
In other chapters: