The Table XXX has been created, but its maximum row size XXX exceeds the maximum number of bytes (8060) of each row ).

Source: Internet
Author: User

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.
*/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.