Here we will use filtered unique index. Create unique nonclustered index Ix_table_column on table(column) where column is not null