Simple Syntax: Multiple Constraints in Alter Table Statement
sql-server-2008
Solution
Add a comma, then add the new constraint (without add keyword) like this:
ALTER TABLE RecipeBox.Recipe ADD CONSTRAINT AKRecipeBox_Recipe_Name
UNIQUE NONCLUSTERED (Name),
CONSTRAINT your_constraint UNIQUE NONCLUSTERED (yourColumn) -- (or whatever type of constraint you're looking for)
Problem
If I have this statement: ``` ALTER TABLE RecipeBox.Recipe ADD CONSTRAINT AKRecipeBox_Recipe_Name UNIQUE NONCLUSTERED (Name) ``` How do I add another constraint to this statement? Is this even possible? Thanks Using SQL SERVER 2008 Developer Edition