MySQL Forums
Forum List  »  Newbie

Re: using Insert Ignore for a specific column only
Posted by: Rich Bernstein
Date: November 08, 2022 08:06AM

That is exactly right. I am using mysqlworkbench and RDS. I just want to be sure that if someone tries to insert a row with an already existing email+campaign that I don't throw a 1062 Duplicate Entry Error.

"if I try to insert a row that would break unique together after using this method, it throws an '1062 Duplicate entry' error."

My plan is to go to mysqlworkbench and:

Go to Indexes tab.
Double-click on a blank row to create a new index.
Choose 'UNIQUE' as the index type.
Check the columns that you want to be unique together (email and campaign)

see any issues?


Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.