Quiz: The Quirks of Common Data Types

Data Types in SQL Server

When it comes to performance, the devil is in the details. And the details are the data types.
  • To avoid the debate about whether or not NULL should be a value, for the purpose of this question assume it's about an INT data type on a non-nullable column ๐Ÿ˜‰
  • Ignore row and page overhead and all that stuff here. Just think about the storage size for the column.

Links and references

What the heck is going on with the datetime data type?

I’m not making that up about the accuracy! Here’s the documentation.

Confused about decimal and numeric data types?

I really like Aaron Bertrand’s discussion of them in his answer to this stackexchange question.

Mildly related: secret XRay glasses for your physical table structure

Ever wondered what happens behind the scenes when you do things like alter column types? Remus Rusanu shows you how to see the real physical structure of tables under the hood.