title: Bulk Collect into is storing less no of rows in collection when using LIMIT?
body: <p>I have written the following anonymous PL SQL Block. </p>
  
  <p>However, the line
  <code>dbms_output.put_line(total_tckt_col.LAST)</code> gives me output as <code>366</code> (in DBMS_OUTPUT is SQL Developer) which is correct when no limit is set. </p>
  
  <p>If the limit is set to <code>100</code> in the <code>FETCH</code> statement then <code>dbms_output.put_line(total_tckt_col.LAST)</code> gives me <code>66</code>. </p>
  
  <p>What am I doing wrong here?</p>
  
  <pre><code>    DECLARE
  
             CURSOR cur_total_tckt  
              is
                  select  t.ticket_id ticket_id, t.created_date created_date, t.created_by created_by, t.ticket_status ticket_status, 
                  t.last_changed last_changed, h.created_date closed_date
                      from n01.cc_ticket_info t
                      inner join n01.cc_ticket_status_history h 
                      on (t.ticket_id = h.ticket_id)
                      where t.last_changed &gt;= '6/28/2012 17:28:59' and t.last_changed &lt; (sysdate + interval '1' day);
  
          type total_tckt_colcn
          is
              TABLE OF cur_total_tckt%rowtype;
              total_tckt_col total_tckt_colcn;
              total_coach_col total_tckt_colcn;
          begin
  
          total_tckt_col  := total_tckt_colcn ();
          total_coach_col := total_tckt_colcn ();
              OPEN cur_total_tckt;
              loop
                  fetch cur_total_tckt bulk collect into total_tckt_col;
   --  fetch cur_total_tckt bulk collect into total_tckt_col limit 100;
              EXIT
              WHEN (cur_total_tckt%NOTFOUND);
              END LOOP ;
              CLOSE cur_total_tckt;   
  
              dbms_output.put_line(total_tckt_col.LAST);  
  
              FOR i IN total_tckt_col.first..total_tckt_col.last
              LOOP
  
              dbms_output.put_line(i);
  
              END LOOP;
          end;
  </code></pre>