No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
manpreet
Best Answer
2 years ago
While executing an
INSERT
statement with many rows, I want to skip duplicate entries that would otherwise cause failure. After some research, my options appear to be the use of either:ON DUPLICATE KEY UPDATE
which implies an unnecessary update at some cost, orINSERT IGNORE
which implies an invitation for other kinds of failure to slip in unannounced.Am I right in these assumptions? What's the best way to simply skip the rows that might cause duplicates and just continue on to the other rows?