Discussion Locked

SQL Server 7.0 create table message

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

The following statement gives a message row too large. Can I get some information on what this means and what effect will have on the overall database.

CREATE TABLE [dbo].[TrendAnnotations] (
[TADIndex] [int] NOT NULL ,
[CreatedBy] [nvarchar] (64) NULL ,
[Annotation] [nvarchar] (4000) NULL
) ON [PRIMARY]
GO

7 replies

by spydergst1

There's a limitation of the total length of row in a table on SQL Server. The following table definition defines a column that can vary up to 4000 characters which exceeds the row limit. The table might still be created on the server, but you won't be able to insert that much data into the table. My suggestion is to change the table definition so that it falls into the row limitation size.

by jsull

In SQL Server Query Optimizer, by default, you can only return 256 characters-I'm assuming that's where your problem is coming in. You can easily correct this by giong to Query | Current Query Connection Options => Advanced and changing the Maximum Characters Per Column setting. Keep in mind, though, that many apps will still have some sort of limitation like this built into them and you will probably need to adjust for this when using this info.

by acmlo

According to 'Maximum Capacity Specifications' of SQL, the maximum 'Bytes per row' is 8060. The Nvarchar data type is an unicode varchar, which takes 2 bytes each. So that your column [Annotation] alone is using 8000 bytes.

This discussion is closed to new replies.