How to remove/drop Fk constraints from my MySQL table?

Suppose table

table.PNG

Use this command to drop/remove fk

ALTER TABLE `table_name` DROP FOREIGN KEY `id_name_fk`;

Use this command to drop/remove  index

ALTER TABLE `table_name` DROP INDEX `id_name_fk`;

For above table

table_name=tab_emp_det

id_name_fk=tab_address_reference 

 

Leave a comment