Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Maximum row size

Author  Topic 

CanadaDBA

583 Posts

Posted - 2005-05-20 : 15:00:42
What maximum row size means? When I tried to create the following test table,

CREATE TABLE [dbo].[tblTest] (
[Col1] [varchar] (20) NOT NULL ,
[ID] [varchar] (10) NOT NULL ,
[Col2] [varchar] (8000) NULL ,
[Col3] [varchar] (8000) NULL ,
) ON [PRIMARY]
GO

I get a message that warns me that "the table has been created but its maximum row size (16030) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes."

Does this mean that the total bytes of a record shouldn't exceed 8060 byte?


Canada DBA

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-05-20 : 16:20:50
Yep, that's exactly what it means. It created the table, and will function properly up until the time you try to insert data that fills those variable fields enough such that the total length exceeds 8060, and BAM! your action fails. Better to redefine the table. Do you really need to have that much capacity? Perhaps you should split those out to a separate table. Also you may want to look into Text datatypes.

---------------------------
EmeraldCityDomains.com
Go to Top of Page
   

- Advertisement -