SQL> SET ECHO ON
SQL> SET SERVEROUTPUT ON
SQL>
SQL> DECLARE
2 TYPE emp_array IS VARRAY(100) OF VARCHAR2(30);
3
4 emps emp_array;
5 inx1 PLS_INTEGER;
6
7 BEGIN
8 emps := emp_array ('emp One','emp Two');
9
10 FOR inx1 IN 1..2 LOOP
11 DBMS_OUTPUT.PUT_LINE(emps(inx1));
12 END LOOP;
13 END;
14 /
emp One
emp Two
PL/SQL procedure successfully completed.
SQL>
SQL>