Prentice Hall Oracle Plsql By Example 3Rd Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Prentice Hall Oracle Plsql By Example 3Rd Edition [Electronic resources] - نسخه متنی

Benjamin Rosenzweig

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



Lab 18.3 Exercises


18.3.1 Use Multilevel Collections


In 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:

a)

Execute the script ch18_4a.sql and explain the output produced.

b)

Modify the script so that instead of using multilevel index-by tables it uses a nested table of index-by tables.

c)

Modify the script so that instead of using multilevel index-by tables it uses a nested table of varrays.


    / 289