SQL>
SQL> DECLARE
2 TYPE integer_varray IS VARRAY(3) OF INTEGER;
3 intArray INTEGER_VARRAY := integer_varray();
4 BEGIN
5 FOR i IN 1..3 LOOP
6 intArray.EXTEND;
7 intArray(i) := 10 + i;
8 END LOOP;
9
10 FOR i IN 1..3 LOOP
11 dbms_output.put ('Integer Varray :'||i);
12 dbms_output.put_line(':'||intArray(i));
13 END LOOP;
14 END;
15 /
Integer Varray :1:11
Integer Varray :2:12
Integer Varray :3:13
PL/SQL procedure successfully completed.
|