0

I constrained the user id, user email address & user name columns in mysql database to have unique values. However, when I added an account with a particular email address & later on deleted it. I have failed to edit/add another account with the same email address that I had used before, even if the account to which it was assigned was deleted.

I keep getting an error of 'Integrity constraint violation: 1062 Duplicate entry ... for key ....'

I have also tried to remove the constraint, but thereafter data is still not updated & I don't receive any error.

Any assistance?

  • What do you do when you delete an account, is the row actually removed from the database? – jeroen Nov 21 '18 at 10:48
  • @jeroen, I deleted data for a particular account, not the row in the database. But when I try to edit another row using the email address that I had previously used on the account that I deleted, the update is not posted. – kpatrickos Nov 21 '18 at 11:00
  • I don't think we have enough information to answer. Can you add your table definition and sample data to the question as text please. – P.Salmon Nov 21 '18 at 11:03

0 Answers0