所有varchar字段按照实际的可能最大设置长度,如果这个提示没消失,就必须考虑分表了

解决方案 »

  1.   

    建议:
     1,将nvarchar改为varchar,如果不是国际文字的话.
     2,将那个nvarchar(4000)的字段改为ntext.
     3,如果还不行,只有分表而建了.
      

  2.   

    这是个警告信息,每个字段如果都按照最大长度加在一起,字节数超过8060就会出这个警告如果你确信你的字段不会超出 8060字节 就可以不理睬这个警告(比如,有两个nvarchar(4000)的字段,但是保证不会两个字段同时有值的情况),否则,这个表可能在以后添加或者修改记录的时候会出错
      

  3.   

    同用的数据库的版本也有关系2005 Enterprise Edition上跑了上面的建表脚本没有同样的警告。然后在2005 的books online上找到这么一段话: 错误号:25027 
     
     This error can occur in two instances: CREATE / ALTER TABLE or INSERT/UPDATE. SQL Server Compact Edition does not allow a row length of fixed column to exceed 8060 bytes. However, SQL Server Compact Edition allows a row to exceed a theoretical limit of 8060 bytes using variable length columns (NTEXT/IMAGE) are not included). For instance, a table could be created with 100 NVARCHAR columns with a length of 200 bytes without an error. However, if you use INSERT or UPDATE to modify a row in a column that had a variable length CHAR datatype (NVarChar) that caused the entire row length to exceed 8060 bytes, then this error would occur.
     
      

  4.   

    将nvarchar改为varchar 就好了`其他什么也没改` 谢谢!