SQL> CREATE OR REPLACE PROCEDURE myProcedure AS
2 TYPE numTable IS TABLE OF NUMBER INDEX BY VARCHAR2(15);
3 carray numTable;
4 BEGIN
5 carray('J') := 1;
6 carray('S') := 2;
7 carray('F') := 3;
8 carray('C') := 4;
9
10 DBMS_OUTPUT.PUT_LINE('carray[''J''] = ' || carray('J'));
11 DBMS_OUTPUT.PUT_LINE('carray[''S''] = ' || carray('S'));
12 DBMS_OUTPUT.PUT_LINE('carray[''F''] = ' || carray('F'));
13 DBMS_OUTPUT.PUT_LINE('carray[''C''] = ' || carray('C'));
14 END myProcedure;
15 /
Procedure created.
SQL>
|