title: Insert into a temporary table and update another table in one SQL query (Oracle)
body: <p>Here's what I'm trying to do:</p>
  
  <p>1) Insert into a temp table some values from an original table  </p>
  
  <pre><code>INSERT INTO temp_table SELECT id FROM original WHERE status='t'
  </code></pre>
  
  <p>2) Update the original table</p>
  
  <pre><code>UPDATE original SET valid='t' WHERE status='t'
  </code></pre>
  
  <p>3) Select based on a join between the two tables</p>
  
  <pre><code>SELECT * FROM original WHERE temp_table.id = original.id
  </code></pre>
  
  <p>Is there a way to combine steps 1 and 2?</p>