Article ID: 155723
Article Last Modified on 2/14/2005
CREATE TABLE test
(
col1 char (10),
col1 varchar (10)
)
GO
/* Let D represent a double character. */
/* Let L represent the leading byte. */
/* Let T represent the trailing byte. */
/* Let S represent a single character. */
/* Let s represent space (ASCII 20). */
INSERT test VALUES ("SDDDDD", "SDDDDD")
GO
SELECT * FROM test
GO
col1 col2 ---------- ---------- SLTLTLTLTs SLTLTLTLTBecause the truncated string is shorter than the maximum length, the char column that does not allow a null value and the char variable is padded with trailing blanks while the varchar column will not store trailing blanks.
Additional query words: DBCS
Keywords: kbinfo kbprogramming KB155723