Supose I have two tables: Customer and itens. So, when I delete one customer, all the itens that customer have associated with him goes deleted two.
I want to know if it is possible to do in mysql. How to implement that in all tables related.
thanks
Hi,
I was looking for the same thing some time ago. If memory serves me right, I read that referential integrity was dropped from MySQL due do performance issues. I hope I'm wrong ;-)
Johan
there is no referential integrity (delete cascade etc.) supported in mySQL ..so what i think u might need to do is go to each table that has customer to be deleted , delete all records and then delete the parent record (u can also delete parent before deleting child in mySQL)