18.3.1 Use Multilevel CollectionsIn this exercise, you will learn more about multilevel collections. Create the following PL/SQL script: -- ch18_4a.sql, version 1.0 SET SERVEROUTPUT ON DECLARE TYPE table_type1 IS TABLE OF integer INDEX BY BINARY_INTEGER; TYPE table_type2 IS TABLE OF table_type1 INDEX BY BINARY_INTEGER; table_tab1 table_type1; table_tab2 table_type2; BEGIN FOR i IN 1..2 LOOP FOR j IN 1..3 LOOP IF i = 1 THEN table_tab1(j) := j; ELSE table_tab1(j) := 4 - j; END IF; table_tab2(i)(j) := table_tab1(j); DBMS_OUTPUT.PUT_LINE ('table_tab2('i')('j'): 'table_tab2(i)(j)); END LOOP; END LOOP; END; Execute the script, and then answer the following questions:
|