title: Adding column with primary key in existing table
body: <p>I am trying to add primary key to newly added column in existing table name <code>Product_Details</code>.</p>
  
  <p>New Column added: <code>Product_Detail_ID</code> (<code>int</code> and <code>not null</code>)</p>
  
  <p>I am trying add primary key to <code>Product_Detail_ID</code> (please note: there are no other primary or foreign key assigned to this table)</p>
  
  <p>I am trying with this query but getting error. </p>
  
  <pre><code>ALTER TABLE Product_Details
  ADD CONSTRAINT pk_Product_Detils_Product_Detail_ID PRIMARY KEY(Product_Detail_ID)
  GO
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p><em>The <code>CREATE UNIQUE INDEX</code> statement terminated because a duplicate key was found for the object name <code>'dbo.Product\_Details'</code> and the index name <code>'pk\_Product\_Detils'</code>. The duplicate key value is (0).</em></p>
  </blockquote>
  
  <p>Am I missing something here? I am using SQL Server 2008 R2. I would appreciate any help.</p>