Checking for constraints in SQL Server

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.

BTW, I got the idea from this snippet and based it, on this StackOverflow article:


Great tutorial website

A good friend of mine and former cohort at echo, told me about this website called NetTuts+ recently. They have a ton of great net tutorials ranging from PHP regular expressions to HTML5 to advanced CSS.

Give them a look:

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.