0

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?

2

1 Answer 1

1

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;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.