Skip to content

MULTISET

DECLARE
TYPE phone_type IS RECORD (
country_code NUMBER(3),
area_code NUMBER(3),
phone_number VARCHAR2(8)
);
TYPE phone_table_type IS TABLE OF phone_type;
phone_table phone_table_type;
BEGIN
phone_table := phone_table_type(
phone_type(1, 408, '1234567'),
phone_type(1, 650, '7654321')
);
END;

No specific output is displayed as it is a PL/SQL anonymous block.

In this example, two user-defined types are declared: a record type phone_type and a table type phone_table_type. In the BEGIN section, two records are inserted into a table phone_table. The phone_table_type tyep enables creation of a table-like structure in PL/SQL block.