SQL>
SQL> DECLARE
2 TYPE charArrayType IS TABLE OF VARCHAR2(5 CHAR);
3 charArray charArrayType := charArrayType(NULL,NULL,NULL);
4 BEGIN
5
6 charArray(1) := 'A';
7 charArray(2) := 'B';
8 charArray(3) := 'C';
9
10 FOR i IN 1..3 LOOP
11 dbms_output.put_line(i||':'||charArray(i));
12 END LOOP;
13 END;
14 /
1:A
2:B
3:C
PL/SQL procedure successfully completed.
SQL>
|