The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.StudentAdd' and the index name 'ukStIdAdd'. The duplicate key value is ().
This means that, at the time you are trying to set up the constraint, there already are some duplicate values in the column. Thus, it will be impossible to set up the constraint.
You have several choices:
- whether you sanitize your table before setting up the constraint (I mean, you take care that there are no duplicates in the column on which you want to put the constraint). Depending on the size of the table it could be time-costly.
- or you give up the idea to put this constraint on this column.
Good luck.