Reputation: 29
I am struggling a little understanding how this is done, and would really appreciate if someone could walk me through how a 2d array in PL/SQL is made?
Upvotes: 0
Views: 802
Reputation: 514
You can think of the following code as each row in table2 has a collection of type table1. You can insert any number of values as is shown in BEGIN.
DECLARE
TYPE table1 IS TABLE OF NUMBER
INDEX BY PLS_INTEGER;
TYPE table2 IS TABLE OF table1
INDEX BY PLS_INTEGER;
var_i table2
BEGIN
var_i (1) (1) := 1;
var_i (1) (2) := 12;
END;
Upvotes: 1