SQL>
SQL> DECLARE
2 TYPE nested_tab_t IS TABLE OF INTEGER;
3
4 tab_1 nested_tab_t := nested_tab_t (1, 2, 3, 4, 5, 6, 7);
5 tab_2 nested_tab_t := nested_tab_t (7, 6, 5, 4, 3, 2, 1);
6
7 PROCEDURE tabs_equal (i_tab_1 IN nested_tab_t, i_tab_2 IN nested_tab_t)
8 IS
9 v_equal BOOLEAN := i_tab_1 = i_tab_2;
10 BEGIN
11 IF v_equal IS NULL
12 THEN
13 DBMS_OUTPUT.put_line ('null');
14 ELSIF v_equal
15 THEN
16 DBMS_OUTPUT.put_line ('equal');
17 ELSE
18 DBMS_OUTPUT.put_line ('not equal');
19 END IF;
20 END tabs_equal;
21 BEGIN
22 tabs_equal (tab_1, tab_2);
23 tab_1.EXTEND (1);
24 tabs_equal (tab_1, tab_2);
25 tab_2.EXTEND (1);
26 tabs_equal (tab_1, tab_2);
27 END;
28 /
PL/SQL procedure successfully completed.
SQL>