how to drop table if foreign key code example Example: drop foreign key ALTER TABLE table_name DROP CONSTRAINT fk_name;