K
K
Konstantin2015-12-10 16:39:28
MySQL
Konstantin, 2015-12-10 16:39:28

How to prevent the deletion of foreign key child records?

Hello. There are 2 tables (A-B), and they are connected by fk (foreign key) by one field. How can I make sure that when deleting a parent key using ON DELETE CASCADE, the child key is not deleted, and the record remains in the table?
You need to bring the base to 3NF

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
romy4, 2015-12-10
@exzotikfruit_official

ON DELETE dev.mysql.com/doc/refman/5.7/en/create-table-forei...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question