I\'m on a MySQL database.
I\'m doing this, but it doesn\'t work.
ALTER TABLE `object` DROP FOREIGN KEY IF EXISTS `object_ibfk_1`;
I\'ve
Similar discussion: How do I drop a foreign key constraint only if it exists in sql server?
IF (OBJECT_ID('FK_ConstraintName', 'F') IS NOT NULL)
is very useful and not mentioned yet here.