Script T-SQL per creare un indice unique in SQL Server:
CREATE UNIQUE NONCLUSTERED INDEX [IX_TbName_MyColumn] ON [dbo].[TbName]
(
  [MyColumn] ASC
)
WHERE ([MyColumn] IS NOT NULL)