Article ID: 155723 - View products that this article applies to.
This article was previously published under Q155723
If dual byte character set (DBCS) data is too long to fit into a char or varchar column, the data is truncated to fit into the column. If Microsoft SQL Server uses a DBCS code page and this truncation happens right in the middle of a double-byte character, the whole double-byte character is discarded.
The following scripts demonstrate this truncation. It is assumed that the code page that applies here is a DBCS code page.
Because 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.
col1 col2 ---------- ---------- SLTLTLTLTs SLTLTLTLT
Contact us for more help
Connect with Answer Desk for expert help.