title: Copy Data from One SQL Server Table to Other in Same Database Without Specifying Columns
body: <p>In SQL Server there is the ability to <code>INSERT</code> all of the data from one table into another using the following statement:</p>
  
  <pre><code>INSERT INTO TABLE1 SELECT * FROM TABLE2
  </code></pre>
  
  <p>When running this on a table with an identity column, even though we have run the command <code>SET IDENTITY_INSERT TABLE1 ON</code>, we get the error:</p>
  
  <p><code>An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON</code></p>
  
  <p>This implies that we would have to list off all of the columns within the <code>INSERT</code> in order for this to work properly. In the situation that we are in, we do not have access to the column names, only the list of the tables we need to copy over. Is there any way to get around this limitation?</p>