查询有什么问题?
delete from categories c
left join categories_products cp on cp.category_id = c.id
left join products p on p.id = cp.product_id
left join images i on i.object_id = cp.product_id
where c.id = 3 and i.site_section = 'products'
MySQL 返回错误。我正在尝试通过 HeidiSQL 执行此查询。错误未知。
另一个问题,这也对我有帮助:如果我没有索引,如何对行进行级联删除?