truncates the string at the 28th position : Large Text « Data Types « SQL Server / T-SQL Tutorial






6> IF OBJECT_ID('dbo.CustomerData') IS NOT NULL
7>   DROP TABLE dbo.CustomerData;
8> GO
1>
2> CREATE TABLE dbo.CustomerData
3> (
4>   custid      INT            NOT NULL PRIMARY KEY,
5>   txt_data    VARCHAR(MAX)   NULL,
6>   ntxt_data   NVARCHAR(MAX)  NULL,
7>   binary_data VARBINARY(MAX) NULL
8> );
9> GO
1> UPDATE dbo.CustomerData
2>   SET txt_data.WRITE(NULL, 28, 0)
3> WHERE custid = 102;
4> GO
1>
2> drop table CustomerData;
3> GO








5.14.Large Text
5.14.1.Updating Large Value Data Type Columns
5.14.2.truncates the string at the 28th position
5.14.3.truncates the string at the ninth position, and appends '102' at the end