title: Iterate over a column in PL/SQL
body: <p>I have a table Emp with EmpID, Empname, Salary and I am trying to do a calculation for each employee. But I am having problems trying to iterate over each emp to do the calculation. I cant use explicit cursors though.</p>
  
  <p>So right now I am just trying to create the list of empIDs:</p>
  
  <pre><code>Declare
      aRows Number;
      eid emp_ID%TYPE;
  Begin
      Select Count(*)
      Into aRows 
      from emp;
  
      Select emp_ID
      Into eid 
      From emp;
  
      FOR days IN 1..Tot_Rows
      Loop
          Dbms_Output.Put_Line(eid);
          eid := eid + 1;
      End Loop;
  END; 
  </code></pre>
  
  <p>But I get the error:
  PLS-00320: the declaration of the type of this expression is incomplete or malformed</p>