In theory, the query should delete the entries from the catalog table and product_to_catalog , where catalog.id and product_to_catalog.catalog_id same and find the entries in the product table with product.id = product_to_catalog.product_id and also delete them. What I made a mistake?
DELETE c.*,pc.*,p.* FROM `catalog` c LEFT JOIN `product_to_catalog` pc ON c.id = pc.catalog_id LEFT JOIN `product` p ON p.id = pc.product_id WHERE c.id = 2
.*After table synonyms? Just judging by the syntax of thedeletecommand and test queries - they are absolutely equivalent. - ApInvent