May 28, 2002 at 10:57 am
I thought a varchar data type required more storage than a fixed type (e.g. char). Supposedly varchar uses "pointers" to point to variable length fields and this overhead adds to the field size. (This may apply only to variables in memory not on disk. I'm not sure.)
Here's what I found on MSDN:
>>>
>>>
varchar[(n)]
Variable-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is the actual length in bytes of the data entered, not n bytes. The data entered can be 0 characters in length...."
So is there no difference, disk storage-wise, between the string 'ABCD' when declared as char(4) or varchar(30). Is this correct?
TIA,
Bill
May 28, 2002 at 11:32 am
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply