I have a table in WebMatrix which contains UserID and Username.
UserID is the Primary Key. Username is an nvarchar. How can I make it unique? At the moment, there can be multiple versions of the same username, which isn’t good!
How can I do this?
Thank you.
You need to add a unique contstraint to the column in the database.
To add a unique constraint to the table the syntax for the sql is