我有一个当我尝试在我的复古(r63)数据库中输入一个sql查询时我得到此错误\ SQL查询:
INSERT INTO `dice`.`wordfilter` (`word`, `replacement`, `strict`) VALUES ('Kut', '***', '1'), ('kanker', '****', '1')
MySQL meldt:Documentatie
#1062 - Duplicate entry 'Kut' for key 'PRIMARY'
这是我使用的代码(它是荷兰语)
INSERT INTO `dice`.`wordfilter` (`word`, `replacement`, `strict`) VALUES ('Kut', '***', '1'), ('kanker', '****', '1')
答案 0 :(得分:0)
您的数据库旨在要求word
列包含唯一值。
由于您已经拥有" Kut"的条目,因此您无法再使用其他条目。
或者:
答案 1 :(得分:0)
该错误与phpmyadmin无关。这是一个SQL错误。表中的word
是主键。
解决方案:删除主键(如果需要,添加另一个 - 一个简单的ID)。
或者您可能只想在列word
中添加索引但添加了主键?