How to check if a Constraint exists in Sql server?
try this: SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME =’FK_ChannelPlayerSkins_Channels’ — EDIT — When I originally answered this question, I was thinking “Foreign Key” because the original question asked about finding “FK_ChannelPlayerSkins_Channels”. Since then many people have commented on finding other “constraints” here are some other queries for that: –Returns one row for each CHECK, UNIQUE, … Read more