title: Assigning more than one column to a collection using BULK COLLECT
body: <p>I am not sure why I am getting this error with this code, Please help me with debugging this code Thanks in advance.</p>
  
  <pre><code>declare
  type emp_t is table of employees%rowtype
  index by pls_integer;
  rec   emp_t;
  begin
    select employee_id,salary,manager_id bulk collect into rec
    from employees where rownum &lt;100;
  
   forall i in 1..rec.last
      update employees
      set salary=salary+10
      where employee_id=rec(i).employee_id;
  
  end;
  
  ORA-06550: line 7, column 3:
  PL/SQL: ORA-00913: too many values
  ORA-06550: line 6, column 3:
  PL/SQL: SQL Statement ignored
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  </code></pre>
  
  <p>I have changed the code to the below format but it's still giving me "expression is of wrong type error"</p>
  
  <pre><code>declare 
  type emp_t is table of employees%rowtype
  index by pls_integer;
  rec   emp_t;
  
  begin
  for val in (
    select employee_id,salary,manager_id 
    from employees where rownum &lt;100)
  
    loop
        rec:=val;
  
    end loop;
  
   forall i in 1..rec.last
      update employees
      set salary=salary+10
      where employee_id=rec(i).employee_id;
  
  end;
  </code></pre>