我正在尝试更新一个表中依赖于另一个表中的行的记录。像这样:
UPDATE product_description SET description="" /* Nothing! */
WHERE product.product_id=product_description.product_id AND product.manufacturer_id=1
答案 0 :(得分:3)
UPDATE product_description
JOIN product ON product.product_id = product_description.product_id
SET description = "" /* Nothing! */
WHERE product.manufacturer_id = 1