Checking for constraints in SQL Server

n n From time to time, you may find that you need to test for the existence of a SQL Server table constraint before you perform some action, such as dropping or altering a constraint or table. Below is a snippet I have found useful. DECLARE @constraintName varchar(200); SET @constraintName = ‘SomeConstraintName’; IF ( SELECT …