oracle dba in telugu
Records are composite variables that can store data values of different types, similar to a
struct type in C, C++, or Java. For more information, see “Understanding PL/SQL Records”.
In PL/SQL records are useful for holding data from table rows, or certain columns from table rows. For ease of maintenance, you can declare variables as table%ROWTYPE or cursor%ROWTYPE instead of creating new record types.
record type definition ::=
A combination of variables, constants, literals, operators, and function calls. The simplest expression consists of a single variable. For the syntax of
expression, see “Expression Definition”. When the declaration is elaborated, the value of
expression is assigned to the field. The value and the field must have compatible datatypes.
A field in a user-defined record.
At run time, trying to assign a null to a field defined as
NULL raises the predefined exception
VALUE_ERROR. The constraint
NULL must be followed by an initialization clause.
A user-defined record.
A user-defined record type that was defined using the datatype specifier
You can define
RECORD types and declare user-defined records in the declarative part of any block, subprogram, or package.
A record can be initialized in its declaration. You can use the
%TYPE attribute to specify the datatype of a field. You can add the
NULL constraint to any field declaration to prevent the assigning of nulls to that field. Fields declared as
NULL must be initialized. To reference individual fields in a record, you use dot notation. For example, to reference the
dname field in the
dept_rec record, you would use