add unique constraint sql server alter table code example
Example: sql server add unique constraint
-- Add a Unique constraint and deifine the constraint name
ALTER TABLE TableName
ADD CONSTRAINT TableName_ColumnName_Unique UNIQUE (ColumnName)
-- Add a Unique constraint and deifine the constraint name
ALTER TABLE TableName
ADD CONSTRAINT TableName_ColumnName_Unique UNIQUE (ColumnName)