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
LNPLS01338

Record Variable Declaration

A record variable is a composite variable whose internal components, called fields, can have different data types. The value of a record variable and the values of its fields can change.

You reference an entire record variable by its name. You reference a record field with the syntax record.field.

You can create a record variable in any of these ways:

LNPLS1780Topics

Syntax

LNPLS1288record_type_definition ::=

Description of record_type_definition.gif follows
Description of the illustration record_type_definition.gif

LNPLS1289field_definition ::=

Description of field_definition.gif follows
Description of the illustration field_definition.gif

See:

LNPLS1290record_variable_declaration ::=

Description of record_variable_declaration.gif follows
Description of the illustration record_variable_declaration.gif

See "rowtype_attribute ::=".

Semantics

LNPLS1781record_type_definition

LNPLS1782record_type

Name of the record type that you are defining.

LNPLS1783field_definition

LNPLS1784field

Name of the field that you are defining.

LNPLS1785datatype

Data type of the field that you are defining.

LNPLS1786NOT NULL

Imposes the NOT NULL constraint on the field that you are defining. For information about this constraint, see "NOT NULL Constraint".

LNPLS1787expression

Expression whose data type is compatible with datatype. When record_variable_declaration is elaborated, the value of expression is assigned to record.field. This value is the initial value of the field.

LNPLS1788record_variable_declaration

LNPLS1789record_1

Name of the record variable that you are declaring.

LNPLS1790record_type

Name of a previously defined record type. record_type is the data type of record_1.

LNPLS1791rowtype_attribute

See "%ROWTYPE Attribute".

LNPLS1792record_2

Name of a previously declared record variable.

LNPLS1793%TYPE

See "%TYPE Attribute".

Examples

Related Topics

LNPLS1794In this chapter:

LNPLS1795In 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