MySQL foreign key constraints, cascade delete
- by Cudos
Hello.
I want to use foreign keys to keep the integrity and avoid orphans (I already use innoDB).
How do I make a SQL statment that DELETE ON CASCADE?
Secondly, that using DELETE ON CASCADE. E.g. if I delete a category then it would delete products related to that category even though there are other categories related to those products.
The…