18.1.1 Use Index-By TablesIn this exercise, you will learn more about index-by tables discussed earlier in the chapter. Create the following PL/SQL script: -- ch18_1a.sql, version 1.0 SET SERVEROUTPUT ON DECLARE CURSOR course_cur IS SELECT description FROM course; TYPE course_type IS TABLE OF course.description%TYPE INDEX BY BINARY_INTEGER; course_tab course_type; v_counter INTEGER := 0; BEGIN FOR course_rec IN course_cur LOOP v_counter := v_counter + 1; course_tab(v_counter) := course_rec.description; END LOOP; END; Answer the following questions:
18.1.2 Use Nested TablesIn this exercise, you will learn more about nested tables discussed earlier in this chapter. Answer the following questions:
|