<p>How do I create a unique constraint on an existing table in SQL Server 2005?</p>

<p>I am looking for both the TSQL and how to do it in the Database Diagram.</p>

```
```
ALTER TABLE dbo.<tablename> ADD CONSTRAINT
            <namingconventionconstraint> UNIQUE NONCLUSTERED
    (
                <columnname>
    ) ON [PRIMARY]
```
```