• Once the table is created, you add exactly one million rows to it, all with ShortDescription equal to 'None', LongDescription and AddDate set to NULL, all numeric columns equal to 1, and AddDate left at its default value. You then execute the statement below to rebuild the indexes and eliminate any potential fragmentation resulting from adding the one million rows.

    Quick point - surely that should be with ShortDescription equal to 'None', LongDescription and ChgDate set to NULL ?

    Maybe I'm just sore from getting it wrong 🙂

    I liked the question - it's useful because it helps marry the real world space calculation to the way SQL stores it.

    If all QOTD's were easy or quick wouldn't bother with them 🙂

    Oh yes - and I got it wrong because I thought the rebuild would push the size over 2GB. My estimate for the number of rows was wrong in any case though!