title: Cannot insert duplicate key row in Object dbo.aspnet_Users
body: <p>I am trying to update the <code>loweredUsername</code> to be the user's email address. While trying to run an update statement I am seeing this error:</p>
  
  <blockquote>
    <p>Cannot insert duplicate key row in object 'dbo.aspnet_Users' with
    unique index 'aspnet_Users_Index'. The duplicate key value is
    (AAAAAAAA-AAAA-AAAA-AAAA-1234A1234a12, test@test.com)</p>
  </blockquote>
  
  <p><code>User_id</code> column has the primary key. </p>
  
  <p>Here is my update statement</p>
  
  <pre><code>update table set LoweredUserName = 'test@test.com' where UserId = 'AAAAAA';
  </code></pre>
  
  <p>UserId is unique in the table. Since I am trying to update the <code>loweredUserName</code> I am not sure why its preventing me to do so since the LoweredUserName does not have any relationships with other tables. Any help will be appreciated. </p>