-- VARRAYs, nested tables, index-by tables
DECLARE
TYPE name_nested_typ IS TABLE OF VARCHAR2(20);
first_name_table name_nested_typ;
TYPE name_index_by_typ IS TABLE OF VARCHAR2(20) INDEX BY BINARY_INTEGER;
last_name_table name_index_by_typ;
BEGIN
first_name_table := name_nested_typ('A', 'B','C');
first_name_table.EXTEND;
first_name_table(4) := 'Ringo';
last_name_table(3) := 'Smith';
DBMS_OUTPUT.PUT_LINE(first_name_table(4));
END;
|