title: how to use bulk collect instead of a loop in Oracle
body: <p>I have a sample query like below in my procedure:</p>
  
  <pre><code>result_rec              mypkg.mytype;
  
  OPEN CUR1 FOR
    select col1, col2, col3 from table1 where something = 'a'; --rows will always be 50
  
        LOOP
           FETCH CUR1
            INTO myrectype;
           EXIT WHEN CUR1%NOTFOUND;
           result_rec.col1 := myrectype.col1;
           result_rec.col2 := myrectype.col2;
           result_rec.col3 := myrectype.col3;
           PIPE ROW (result_rec);
        END LOOP;
  </code></pre>
  
  <p>As you can see, every time I am looping 50 times.  Is there a better way to do this? something like BULK COLLECT INTO? how would I implement that?</p>