• SQLRNNR (12/20/2012)


    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.

    ALTER TABLE sometest

    ADD CONSTRAINT someconstraint UNIQUE (testid,col1,col2);

    Disagree!

    This constraint can not represent value of Null even if all columns are populated with Nulls.

    Besides, only one occurrence of Nulls in all columns is allowed.