SQL>
SQL> SET ECHO ON
SQL> SET SERVEROUTPUT ON SIZE 1000000
SQL>
SQL> DECLARE
2
3 TYPE integer_varray IS VARRAY(3) OF INTEGER;
4
5 intArray INTEGER_VARRAY := integer_varray();
6
7 BEGIN
8
9 FOR i IN 1..3 LOOP
10
11 intArray.EXTEND;
12
13 intArray(i) := 10 + i;
14
15 END LOOP;
16
17 FOR i IN 1..3 LOOP
18
19 dbms_output.put ('Integer Varray :'||i);
20 dbms_output.put_line(':'||intArray(i));
21
22 END LOOP;
23
24 END;
25 /
Integer Varray :1:11
Integer Varray :2:12
Integer Varray :3:13
PL/SQL procedure successfully completed.
SQL>
SQL>
|