SQL Server stores
DATETIME internally as two
INT values, as SQLDenis explains.
Is it correct (by logical extension) that
DATE types (SQL Server 2008+) are stored as a single
migrated from stackoverflow.com Jun 13 '12 at 17:21
This question came from our site for professional and enthusiast programmers.
Just for fun, let's see what's on the page.
Partial results (will differ on your system a bit):
So let's look at page 228:
Partial results. We see that the value for d occupies 3 bytes. If we look at the memory dump for the row, we see a hex value for the internal storage component:
(Looks amazingly similar to what's on the page, just with bits flipped in the opposite order?)