【发布时间】:2011-01-22 22:25:54
【问题描述】:
我正在尝试完成这个查询;我的标签字段设置为唯一,我只是希望数据库忽略任何重复的标签。
INSERT INTO table_tags (tag) VALUES ('tag_a'),('tab_b'),('tag_c')
ON DUPLICATE KEY IGNORE '*the offending tag and carry on*'
甚至可以接受
INSERT INTO table_tags (tag) VALUES ('tag_a'),('tab_b'),('tag_c')
ON DUPLICATE KEY UPDATE '*the offending tag and carry on*'
【问题讨论】:
标签: mysql