title: How to initialize a matrix in plsql
body: <p>I've tried to Map a table with associative arrays , but i can't figure out how to initialize it </p>
  
  <p>here is an example :</p>
  
  <pre><code>TYPE RecType IS RECORD
   (
    value1   NUMBER,
    value2   NUMBER,
    value3   NUMBER
   );
   TYPE TblType IS TABLE OF RecType INDEX BY PLS_INTEGER;
   TYPE TblOfTblType IS TABLE OF TblType INDEX BY PLS_INTEGER;
   matrix   TblOfTblType;
  </code></pre>
  
  <p>Now when i tried to initialize the matrix like this : </p>
  
  <pre><code>FOR i IN matrix.FIRST .. matrix.LAST LOOP
    FOR j IN matrix (i).FIRST .. matrix (i).LAST LOOP
         matrix(i)(j) := NULL;  
    END LOOP;
  END LOOP;
  </code></pre>
  
  <p>It doesn't work !I also tried </p>
  
  <pre><code>matrix := TblOfTblType()();
  </code></pre>
  
  <p>it shows the following error :    </p>
  
  <blockquote>
    <p>PLS-00363 expression 'Matrix' cannot be used as an assignment target .</p>
  </blockquote>