LMSouq
general-dev Open

On duplicate key ignore?

CO
CodeChap
1 month ago
3 views
Problem Description
I'm trying to finish this query; my tag field is set to UNIQUE and I simply want the database to ignore any duplicate tag. INSERT INTO table_tags (tag) VALUES ('tag_a'),('tab_b'),('tag_c') ON DUPLICATE KEY IGNORE '*the offending tag and carry on*' or even this would be acceptable INSERT INTO table_tags (tag) VALUES ('tag_a'),('tab_b'),('tag_c') ON DUPLICATE KEY UPDATE '*the offending tag and carry on*'

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base