SQL> DECLARE
2 TYPE num_tab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
3 myTable1 num_tab;
4 myTable2 num_tab;
5 v_num NUMBER :=13;
6 BEGIN
7 myTable1(1):=1001;
8
9 myTable1(10):=1002;
10
11 myTable1(-10):=1003;
12
13 myTable1(v_num):=1004;
14
15 myTable2 :=myTable1;
16
17 dbms_output.put_line(to_char(myTable2(1))||' '||
18 to_char(myTable2(10))||' '||
19 to_char(myTable2(-10))||' '||
20 to_char(myTable2(v_num)));
21 END;
22 /
1001 1002 1003 1004
PL/SQL procedure successfully completed.
|