title: Temporary table in oracle11g and select multiple rows
body: <p>In my oracle stored procedure,I need to create temporary table. I want to insert rows in temporary table based on some logic and return this rows from stored procedure. </p>
  
  <p>My database is in oracle 11G. I am using oracle sql developer for creating stored procedure.</p>
  
  <p>Getting below error while trying to fetch multiple rows.</p>
  
  <p><strong>Error(6,4): PLS-00428: an INTO clause is expected in this SELECT statement</strong></p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE TestStoredP AS 
   stmt varchar2(1000);
  
  BEGIN  
  
    select emp_id,empname INTO AAA,BBB from EMPLOYEE;
  
     stmt := 'create global temporary table temp(id number(10))';
  
     EXECUTE IMMEDIATE stmt;  
  
     stmt := 'insert into temp values(1)';   
     EXECUTE IMMEDIATE stmt;  
  
     stmt := 'select * from temp';   
     EXECUTE IMMEDIATE stmt;  
  
     execute immediate ' drop table temp'; 
  
  END TOPS; 
  </code></pre>
  
  <p>Please suggest how to implement this.</p>