• Nils Gustav Stråbø (10/19/2012)


    Aaaaarg!!! Got it wrong because of the unclustered index options.

    I know that SQL Server enforces unique constraints by creating unique indexs, but I wasn't sure if this was what the author meant.

    +1

    This kind of gotcha is common on QotD, and it's always a guessing game what the author intended. I say "gotcha" not b/c I think it was a deliberate attempt by Tom to mislead, but b/c of the 2 different ways in which people can interpret this.

    Good question though...

    Rich

    Edited to add hyperlink: There's a nice write-up about table variables at this link on SSC[/url]. Although that article's intent was to compare table variables to temp tables, I find the tabular summary presented there to be handy.