title: Table Variables in Oracle PL/SQL?
body: <p>I've recently started a new position as a developer and I'm having a bit of trouble with PL/SQL.  I've used MS SQL for a number of years but I'm finding PL/SQL a bit trickier.</p>
  
  <p>One of the things I used to do when writing functions and stored procedures in MS SQL was to put reoccuring result sets into a table variable so I wouldn't have to requery them throughout my procedure.</p>
  
  <p>Something like this:</p>
  
  <pre><code>declare @badPeople table(recordPointer int)
  insert into @badPeople
  select BP_Record_Pointer
  from People
  where BP_Bad = 1
  </code></pre>
  
  <p>I'm looking at doing something similar in PL/SQL but I'm not quite sure how to get started.  Any ideas if this is even possible?</p>