database - MySQL: why foreign key is not deleted after constraint deleting? -


after add foreign key command:

alter table_name add constraint constraint_name foreign key foreign_key_name(columns) references parent_table(columns) on delete action on update action; 

we have table constraint 'constraint_name' , key 'foreign_key_name'.

after delete foreign key:

 alter table table_name  drop foreign key constarint_name 

we have table key 'foreign_key_name', constraint deleted.

1) why key alive? how key deleting (after constraint deleting) affect working capacity? 2) why key not deleted constraint deleting?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -