If I have mssql varchar [1024] that is always empty in the table, how many actual bytes will be wasted in the db file on disk in line?
Please let me know the size for both:
- NULL allowed to store ''
- NULL is not allowed to store. ''
- NULL allowed to store NULL
Since the maximum varchar size is> 2 ^ 1 and <2 ^ 3 I would assume 2 bytes for the length. But there may be a few more overheads, for example, if there is a link that points to the actual data.
source share