After this Lab, you will be able to:
As mentioned in the introduction to this chapter, PL/SQL allows you to define nested records. These are records that contain other records and collections. The record that contains a nested record or collection is called an enclosing record.
Consider the following code fragment.
▪ FOR EXAMPLE
DECLARE TYPE name_type IS RECORD (first_name VARCHAR2(15), last_name VARCHAR2(30)); TYPE person_type IS (name name_type, street VARCHAR2(50), city VARCHAR2(25), state VARCHAR2(2), zip VARCHAR2(5)); person_rec person_type;
This code fragment contains two user-defined record types. The second user-defined record type, person_type, is a nested record type because ...