• SQLRNNR (12/20/2012)


    Stewart "Arturius" Campbell (12/20/2012)


    IMHO, I think the correct answer here will be "It depends".

    It depends on whether filtered indexes are utilised or not, etc.

    However, it could be that the PO intended that the use of filtered index(es) is implied (or should be assumed)...

    I disagree that "It depends" with this question. It was asked if it was simply possible. No need to consider filtered indexes, you just need to know if there is any possible way to insert multiple nulls into a unique constraint - imho.

    A unique constraint is not the same as a unique index.

    Anyway, your explanation of a constraint over multiple columns demonstrates that the question has the correct answer (albeit a little tricky :-)), but just an incorrect explanation.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP