Microsoft KB Archive/175659

From BetaArchive Wiki
Knowledge Base

Article ID: 175659

Article Last Modified on 10/3/2003


  • Microsoft SQL Server 6.5 Standard Edition

This article was previously published under Q175659

BUG #: 16074 (WINDOWS: 6.5)


If you create an "oversized" table (that is, a table with a width greater than 1,962 bytes), you will receive the following message:

The total row size, 2575, for table 't1' exceeds the maximum number of
bytes per row, 1962.

If this table does not have an index and you execute a query with an ORDER BY clause (such as "SELECT * from t1 ORDER BY c1"), you will receive the following message:

Msg 416, Level 16 State 1
Create of work table failed because the row size would be 2575.
This exceeds the maximum allowable size of a row in a table, 2014.


To avoid this problem, use a statement similar to the following to create an index on the table:

   create index ti on t1(c1)


Microsoft has confirmed this to be a problem in SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.


The following statements will reproduce the problem:

   create table t1
   (c1 varchar(255) not null,
    c2 varchar(255) not null,
    c3 varchar(255) not null,
    c4 varchar(255) not null,
    c5 varchar(255) not null,
    c6 varchar(255) not null,
    c7 varchar(255) not null,
    c8 varchar(255) not null,
    c9 varchar(255) not null,
    c10 varchar(255) not null)
   insert t1 values("A","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("B","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("C","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("D","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("E","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("F","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("G","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("H","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("I","Z","Z","Z","Z","Z","Z","Z","Z","Z")
   insert t1 values("J","Z","Z","Z","Z","Z","Z","Z","Z","Z")

Additional query words: sp sp2

Keywords: kbbug kbfix kbusage kbsqlserv650bug KB175659