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