title: using nested table as in Parameter to a Procedure
body: <p>I have a table T1 and I want to insert multiple rows at a time through a procedure using collection. I have written the code but when I'm trying to execute it throws an error. Please advise.</p>
  
  <pre><code>create table t1 ( id number , name varchar2(10));
  /
  
  create or replace PACKAGE PKG1 AS
     TYPE TAB_LIST IS TABLE OF T1%ROWTYPE;
     PROCEDURE PROC1 (p_val IN TAB_LIST);
  END PKG1;
  /
  
  create or replace PACKAGE BODY PKG1 AS
  PROCEDURE PROC1 (P_VAL IN TAB_LIST
                  )
  IS
  BEGIN
      FOR i IN p_val.FIRST..p_val.LAST
      LOOP
          insert  INTO T1
              (
                id, name
              )
          VALUES
              (
                p_val(i).id,
                p_val(i).name
              );
          END LOOP;
      END;
  END;
  </code></pre>
  
  <hr>
  
  <p>error after executing </p>
  
  <pre><code>DECLARE
      p_val PKG1.TAB_LIST;
  BEGIN
      p_val := PKG1.TAB_LIST(123,'XYZ');
  END;
  
  Error report -
  ORA-06550: line 5, column 11:
  PLS-00306: wrong number or types of arguments in call to 'TAB_LIST'
  ORA-06550: line 5, column 11:
  PLS-00306: wrong number or types of arguments in call to 'TAB_LIST'
  ORA-06550: line 5, column 2:
  PL/SQL: Statement ignored
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  </code></pre>