Answered
Dropping a constraint in MS SQL Server
Hi All,
Does anybody know if there's a way to check if a constraint exists before dropping it?
In other words, how do I check if constraint "FK_Products1_ID" exists before dropping it (see below) so I won't get the error " 'FK_Products1_ID' is not a constraint. Could not drop constraint"
ALTER TABLE Products2_Table DROP CONSTRAINT FK_Products1_ID
Thanks in advance!
Does anybody know if there's a way to check if a constraint exists before dropping it?
In other words, how do I check if constraint "FK_Products1_ID" exists before dropping it (see below) so I won't get the error " 'FK_Products1_ID' is not a constraint. Could not drop constraint"
ALTER TABLE Products2_Table DROP CONSTRAINT FK_Products1_ID
Thanks in advance!
