title: How can I copy an IDENTITY field?
body: <p>I’d like to update some parameters for a table, such as the dist and sort key. In order to do so, I’ve renamed the old version of the table, and recreated the table with the new parameters (these can not be changed once a table has been created).</p>
  
  <p>I need to preserve the id field from the old table, which is an IDENTITY field. If I try the following query however, I get an error:</p>
  
  <pre><code>insert into edw.my_table_new select * from edw.my_table_old;
  ERROR: cannot set an identity column to a value [SQL State=0A000] 
  </code></pre>
  
  <p>How can I keep the same id from the old table?</p>