How to Alter constraint in sql server?

 Posted by Sriramnandha on 6/3/2012 | Category: Sql Server Interview questions | Views: 1679 | Points: 40
Answer:

Alter Constraint:

Alter table <TableName> Add Constraint <constraintname>
Check(Columnname <100)
Go

Drop Constraint:

Alter Table <TableName> Drop Constraint <constraintname>
Go

Clean up

ALTER DATABASE <DataBaseName>
SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
DROP DATABASE <DataBasename>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Jasminej on: 6/4/2012 | Points: 10
Hey

Do you think, the followings are relating to Constraints ?

-Why you are Changing the Database mode to SINGLE ?
-Why you are Removing Database ?

Login to post response