I have a column in one of the tables in a SQL Server database where the values must be unique. This column can also contain null values. Now, if I add a unique index on this column, it ensures that all values must be unique in the column (and indexes them too), but, that includes null values too. This means that the column can contain only one null value (at most) i.e. duplicate nulls are not allowed! The problem is how to allow multiple null values in a column with unique index? The solution is to ...
[More]