Welcome to WindowsClient.net | Sign in | Join

Zuker On Foundations

The realm of .NET (WPF, WCF and all around)

T-SQL - Create Unique Constraint

Searched it for a while, thought it might be worth sharing.

Following is the T-SQL script to alter a table to apply a UNIQUE constraint on a certain column:

ALTER TABLE [TableName] WITH NOCHECK
ADD CONSTRAINT UniqueConstraintName UNIQUE ([ColumnName])

Posted: Sep 10 2008, 07:44 AM by zuker | with no comments
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 

Page view counter