M
M
myxasa2017-10-12 16:08:55
MySQL
myxasa, 2017-10-12 16:08:55

How to do cascading deletion of parent/child rows?

There is a table with fields id parent_id
parent_id points to the id of this table
. Is it possible to do a cascading delete? by type as with foreign keys , it is
desirable to
delete the user with an example, and then it deletes all records associated with this user in other tables

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Abdula Magomedov, 2017-10-12
@myxasa

How to properly organize foreign keys in MySQL?
denis.in.ua/foreign-keys-in-mysql.htm
You create foreign keys. He will remove it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question