DCSIMG
T-SQL - Create Unique Constraint - Zuker On Foundations

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])

Published Thursday, January 15, 2009 3:25 PM by Amir Zuker

תגים:,

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: