title: Create a new table and adding a primary key using SELECT INTO
body: <p>I have a database table that is created using the SELECT INTO SQL syntax. The database is in Access and consists of roughly 500,000 rows. The problem is when I do the join, the unique is the entire row - what I would like is an auto number ID field as the Primary Key.</p>
  
  <p>Code I currently have is something like:</p>
  
  <pre><code>SELECT INTO new_table
  FROM 
  (SELECT * FROM table a, table b WHERE a.name = b.name)
  </code></pre>
  
  <p>I was hoping there was a way to add a clause into my SELECT INTO query so I could add a primary key and create the table in one pass - is this possible?</p>
  
  <p>If not, what is the best way to do this using SQL only? </p>