Hi @Jan Vávra
Each row has a null bitmap for columns that allow nulls. If the row in that column is null then a bit in the bitmap is 1 else it's 0.
For variable size datatypes the acctual size is 0 bytes.
For fixed size datatype the acctual size is the default datatype size in bytes set to default value (0 for numbers, '' for chars).
In my opinion, uniqueidentifier is a fixed size datatype.
Check this sample:
declare @guid1 uniqueidentifier = null
,@guid2 uniqueidentifier = '728B7419-6E97-4F54-B06B-536B31AE954E'
,@guid3 uniqueidentifier = '728B7419-6E97-4F54-B06B-536B31AE954E4578RT'
select DATALENGTH(@guid1)
,DATALENGTH(@guid2)
,DATALENGTH(@guid3)
Best regards,
LiHong