Script T-SQL per creare un indice unique in SQL Server:

SQL

CREATE UNIQUE NONCLUSTERED INDEX [IX_TbName_MyColumn] ON [dbo].[TbName]
(
  [MyColumn] ASC
)
WHERE ([MyColumn] IS NOT NULL)
Tags:
Database75 SQL90 SQL Server100 T-SQL66
Potrebbe interessarti anche: