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
Post a Comment