first step, drop old constraint: (reference)
alter table `honnikery`
drop foreign key `fk_name`;
notice only constraint is deleted
second step, add new constraint:
alter table `honnikery`
add constraint `fk_name`
foreign key (`bidar`) references `honnikery1` (`bidar`) on delete cascade;
alter table `honnikery`
drop foreign key `fk_name`;
notice only constraint is deleted
second step, add new constraint:
alter table `honnikery`
add constraint `fk_name`
foreign key (`bidar`) references `honnikery1` (`bidar`) on delete cascade;
No comments:
Post a Comment