这是来自 Prestashop 的表格
为什么即使“product_default”不存在我也会收到此错误?
Duplicate entry '2971-0' for key 'product_default'
INSERT INTO
psproduct_attribute
(id_product
,location
,ean13
,upc
,quantity
,reference
,supplier_reference
,wholesale_price
,price
,ecotax
,weight
,unit_price_impact
,minimal_quantity
,default_on
,available_date
) VALUES ('2971', '', '', '', '0', '', '', '0', '0', '0', '0', '0', '1', '0', '0000-00-00')
表结构如下:
最佳答案
事实证明,id_product
具有分配给它的 UNIQUE
键。我不得不删除它,现在它可以正确插入。
关于mysql - 为什么在该字段不存在时会出现重复条目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31404903/