Mistake #7: treating CHAR(10) and VARCHAR(10) as interchangeable. Fixed-length CHAR values are padded with whitespace to the declared length, so a shorter value still occupies the full allocation. section 3.2
The padded Hello!
In CHAR(8), inserting Hello! uses 8 bytes because the two unused character positions are filled with whitespace. Address columns and fixed-length ZIP codes make the choice concrete. section 3.2
Listing 3.5 Updating the DepartmentCode column to a fixed-length string
ALTER TABLE dbo.Employees ALTER COLUMN DepartmentCode NCHAR(2) ;
Compare fixed-length alteration syntax with the DepartmentCode example. section 3.2




