title: How to insert data to a temp table from multiple tables in SQL
body: <pre><code>INSERT INTO #Temp (id, id2, a, b) 
  SELECT id, id2, a, b 
  FROM SomeOneTable
  </code></pre>
  
  <p>We usually get the data from one table, How do we insert the data on temp table if (<code>id</code> and <code>a</code>) fields are from a separate table and  (<code>id2</code> and <code>b</code>) are from another table. I want all the 4 fields to be in one Temp table. </p>