title: mysql - error with creating temporary table from resultset
body: <p>i want to create a temporary table on the fly from a result set so that i can run some queries against this resultset.</p>
  
  <p>Here is my sql:</p>
  
  <pre><code>CREATE TABLE temp_table_1 AS (SELECT * FROM A LEFT OUTER JOIN B ON A.id = B.id WHERE B.id IS null);
  
  
  SELECT QUA.id, QUA.name, QUA.address, QUA.acc, QUA.module, QUA.tag
  FROM QUA,temp_table_1
  WHERE 
  QUA.name = temp_table_1.name AND 
  QUA.acc = temp_table_1.acc AND
  QUA.tag = temp_table_1.tag
  </code></pre>
  
  <p>When i run the first query to create the temp table, I get the error message:</p>
  
  <p>'Duplicate Colum Name 'id''</p>
  
  <p>Thanks a lot for your help.</p>