||SQL Server Tips by Gama and Naughter
Char stores fixed length ASCII
data. The data is padded with spaces on the right as this example
DECLARE @b char(10)
SELECT CAST(@b as binary(10))
The 202020… are a sequence of
spaces. 20 is the hexadecimal representation of the space character.
Note: An interesting detail is
that char can actually store non-ASCII data. In the previous example
let us replace the second line with this one:
The three bytes are there,
although not visible when displayed.
The above book excerpt is from:
Turbocharge Database Performance with C++ External Procedures
Joseph Gama, P. J. Naughter