How SQL Server lays out each data type on a data page, down to the bytes.

Each post decodes real pages: date and time types, strings and UTF-8, GUIDs, DECIMAL and MONEY, the NULL bitmap, BIT packing, row-overflow and LOB data, forwarded records, and what ROW and PAGE compression do to the record. The last entry is a follow-up that proves the forwarded record back-pointer at the byte level.
- How SQL Server Stores a DATETIME, Down to the Bytes
- How SQL Server Stores DATETIME2, DATE, and TIME
- Seeing Exactly Where SQL Server Stores Each Column
- How SQL Server Stores Strings: varchar, nvarchar, and What UTF-8 Changed
- How SQL Server Stores a GUID, and Why Random Ones Fragment
- How SQL Server Stores DECIMAL and NUMERIC, Down to the Bytes
- How SQL Server Stores MONEY and SMALLMONEY, and the Rounding Trap
- The NULL Bitmap: How SQL Server Records Nullability
- How SQL Server Packs BIT Columns Into a Single Byte
- Row-Overflow and LOB: When a Row Leaves the Page
- Forwarded Records: What an UPDATE Can Do to a Heap
- What ROW and PAGE Compression Do to the Record
- Forwarded Records: the Back-Pointer and the Trip Home
Questions or corrections are welcome on Bluesky or LinkedIn. See all series on this blog.