From: http://hi.baidu.com/zhuhailangke/blog/item/5b7b0c1392fd7b47f919b86f.html
Today, when you create a database in the query analyzer, a warning is displayed: The Table XXX has been created, but its maximum size (8926) exceeds the maximum number of bytes (8060) in each row ). If the length of the result row exceeds 8060 bytes, insert or update of the row in this table will fail.
The size of each row in a table exceeds the maximum byte of 8060. We recommend that you use
Change the char (nvchar) or varchar (nvarchar) type to the text (ntext) type.
SQL stipulates that the maximum storage length of a record is 8060 bytes.
Therefore, if you create a table similar to the following table, this warning is displayed:
Create Table T (A varchar (8000), B varchar (8000 ))
Because the length of a + B = 16000 has exceeded the maximum storage length of a record by 8060
In this case, the table can be created normally, as long as you store/modify data
Datalength (A) + datalength (B) <8060
Then your operation will not have any problems.
Otherwise, the Operation will fail.
This is the original meaning. If you are afraid of errors, you can use text.
SQL code:
Create table # (C1 varchar ( 8000 ), C2 varchar ( )
/*
warning: Table created '#', however, the maximum size (16025) of a row exceeds the maximum number of bytes (8060 ). If the length of the result row exceeds 8060 bytes, insert or update of the row in this table will fail.
*/
InsertInto#Select'A','B'--> OK
/*
(The number of affected rows is 1)
*/
Insert Into # Select Replicate ( ' A ' , 8000 ), Replicate ( ' B ' , 8000 ) -- > Error
/*
Server: Message 511, level 16, status 1, Row 1
A row with a size of 16013 cannot be created. The value must be greater than the maximum value of 8060.
The statement has been terminated.
*/