Add Unique Constraint
ALTER TABLE [dbo].[TableName] ADD CONSTRAINT [ConstraintName] UNIQUE NONCLUSTERED([ColumnName] ASC) ON [PRIMARY]
Add Unique Index
CREATE UNIQUE NONCLUSTERED INDEX [ConstraintName] ON [dbo].[TableName]([ColumnName]) ON [PRIMARY]
There is no difference between Unique Index and Unique Constraint. Even though syntax are different the effect is the same. Unique Constraint creates Unique Index to maintain the constraint to prevent duplicate keys. Unique Index or Primary Key Index are physical structure that maintain uniqueness over some combination of columns across all rows of a table. It is a convenient way to enforce a Unique Constraint for SQL Server.