Based on the question:
Is it possible to create a table with unique constraint that allows multiple NULL values from SQL Server 2008 onwards?
I don't disagree with the correct answer. I disagree with the explanation. I also do disagree with many of the complaints thus far about the question. You can most certainly have multiple null values in a unique constraint. Don't constrain yourselves to a narrow scope of a constraint on a single column - where you can have only one null value.
Instead expand that constraint a little and the question is completely valid.
CREATE TABLE sometest (testid INT, col1 INT, col2 INT);
ALTER TABLE sometest
ADD CONSTRAINT someconstraint UNIQUE (testid,col1,col2);
INSERT INTO sometest(testid,col1,col2)
DROP TABLE sometest;
This demonstrates that multiple null values is possible and that multiple null values is even possible within each of the columns so long as all of the columns together remain unique.
That said, the sample code provided in the explanation for this question does work. It does allow two null values to be inserted. And it is also a form of creating a unique constraint.
Jason AKA CirqueDeSQLeilI have given a name to my pain...
MCM SQL Server, MVP
Posting Performance Based Questions - Gail Shaw