Arsh - Thursday, September 21, 2017 7:46 AM
Not exactly. CHAR or NCHAR fields will always be fixed length and all of the field gets loaded everywhere it goes. VARCHAR or NVARCHAR fields have some overhead bytes, but also mean that what is stored in the row is the overhead plus only the string value, and not any empty spaces to fill out the length of the field. For example, if a field is defined as VARCHAR(255), that means that you have the overhead bytes plus only the characters in the field, which will likely be less than 255 characters. The number of characters can vary from 0 to 255, or you can have a NULL value. CHAR(255) on the other hand, will always have 255 characters stored in the row. That's why you rarely see CHAR fields of any sizable length.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)