How many bytes does a NULL nvarchar value take?

  • I am doing some storage calculations and have a simple question for a person in the know: how many bytes does an nvarchar NULL take? Is this the same for Varchar?

    Thanks,

    Olja

  • With no data in the nvarchar column whatsoever - 2 bytes (1 indicating nullability, one indicating length) and 1 bit in the null bit map.

    Check out BOL for all of the 'gory' details:

    • Estimating the Size of a Table
    • Estimating the Size of a Table Without a Clustered Index
    • Estimating the Size of a Table with a Clustered Index

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply