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
Which Database you are using??
If SQL Server
if exists (select 1 from sys.objects where object_id = OBJECT_ID(N'[FKName]') AND parent_object_id = OBJECT_ID('TableName')) alter table TableName drop constraint FKName