title: How to combine data into a temporary table in Mysql
body: <p>I have a very large table called <code>paypal_ipn_orders</code>. In this table I have 2 important bits of information a row called <code>item_name</code> and a row called <code>sort_num</code>. I want to use certain parameters to pull out records from <code>paypal_ipn_orders</code> and put them into a temporary table called <code>temp_table</code>. I know how to select the records as follows</p>
  
  <pre><code>SELECT `item_name`, `sort_num` 
  FROM `paypal_ipn_orders`
  WHERE `packing_slip_printed` = 0
  AND LOWER(`payment_status`) = `completed`
  AND `address_name` &lt;&gt; ''
  </code></pre>
  
  <p>That query selects all the records I want to move to the temporary database I just don't know how to do that. </p>