Space occupied by NULL values in Varchar columns

General
Enthusiast

Space occupied by NULL values in Varchar columns

Hi,

Can someone please tell me how much of space does a NULL value occupy for a VARCHAR column?

I read somewhere that NULL occupies the space equal to the datatype of the column. Does that mean VARCHAR(10) occupies 10+2=12 bytes for a NULL value?

Regards,

Dinesh

1 REPLY
Junior Supporter

Re: Space occupied by NULL values in Varchar columns

No, it isn't.

Nulls VARCHARs don't take space (presence and offset bytes apart).

Cheers.

Carlos.