MySQL Forums
Forum List  »  Newbie

Re: insert on duplicate with a where clause on a field not part of the unique key
Posted by: Peter Brawley
Date: June 11, 2017 01:45PM

If a criterion for key duplication can't be in the key, I don't see how to make On Duplicate Key work. There are ways to write Triggers that abort an Insert by forcing a fatal error, but they're dodgy. How about writing a stored procedure?

Options: ReplyQuote


Subject
Written By
Posted
Re: insert on duplicate with a where clause on a field not part of the unique key
June 11, 2017 01:45PM


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.