Unique Index with SQL Server

If you need a unique constraint on a column, but you also plan on doing lookups and filters based on the value in that column, you might want to use a Unique Index instead.  It looks like this:

CREATE UNIQUE NONCLUSTERED INDEX
ConstraintName ON dbo.TableName
(
ColumnName
) ON [PRIMARY]

Leave a comment