How do I use on delete cascade in mysql?
Posted
by Marius
on Stack Overflow
See other posts from Stack Overflow
or by Marius
Published on 2009-02-04T13:31:20Z
Indexed on
2010/04/26
21:23 UTC
Read the original article
Hit count: 212
I have a database of components. Each component is of a specific type. That means there is a many-to-one relationship between a component and a type. When I delete a type, I would like to delete all the components which has a foreign key of that type. But if I'm not mistaken, cascade delete will delete the type when the component is deleted. Is there any way to do what I described?
© Stack Overflow or respective owner