title: Cannot insert duplicate key in object 'dbo.Countries'. The duplicate key value is (1)
body: <p>I am trying to copy data from one table to another and i get the error Cannot insert duplicate key in object 'dbo.Countries'. The duplicate key value is (1). I understand what this means, but how do i remove it?<br>
  This is my sql server query:</p>
  
  <pre><code>SET IDENTITY_INSERT [dbo].[countries] ON
      ----Create TestTable
      CREATE TABLE TestTable (FirstName VARCHAR(100), LastName VARCHAR(100))
      ----INSERT INTO TestTable using SELECT
      INSERT INTO [dbo].[Countries] (countryID, countryName)
      SELECT countryId, countryName
      FROM [dbo].[Sheet1]
      ----Verify that Data in TestTable
      SELECT countryID, countryName
      FROM [dbo].[Countries]
      ----Clean Up Database
      DROP TABLE TestTable
      SET IDENTITY_INSERT [dbo].[countries] OFF
  </code></pre>
  
  <p>The error message is:</p>
  
  <pre><code>Msg 2627, Level 14, State 1, Line 6
  Violation of PRIMARY KEY constraint 'PK_dbo.Countries'. Cannot insert duplicate key in object 'dbo.Countries'. The duplicate key value is (1).
  The statement has been terminated.
  
  (26 row(s) affected)
  </code></pre>