我收到错误 1242 子查询返回超过 1 行
如果产品包含这些添加,我想要更新列 bio 并将其设置为“bio-plant”。
UPDATE product
SET bio = 'bio-plant'
WHERE ( SELECT distinct product.Id_Product
FROM product , product_has_additions
WHERE product_has_additions.code IN ('E170', 'E220', 'E296', 'E300', 'E306', 'E322', 'E330', 'E333', 'E334', 'E335', 'E336', 'E341', 'E392', 'E400', 'E401', 'E402', 'E406', 'E407', 'E410', 'E412', 'E414', 'E415', 'E422', 'E440', 'E464')
AND product.Id_Product = product_has_additions.Id_Product
);