Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Max row size exceeds max number of bytes WARNING

Status
Not open for further replies.

TomBarrand

Programmer
Aug 9, 2000
162
GB
I have added some additional columns to an existing table, when I do this I get the following warning. What does this mean?

Warning: The table 'Referrals' has been created but its maximum row size (9238) 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.
 
The maximum row length of a table in SQL Server is 8060 bytes. This error is just warning you that the total length of all your columns is more than this. If you attempted to insert a row which filled up every column with data then it would fail. --James
 
Your best bets are either reduce the size of some of your columns if the data supports it (people might set a char column for 200 becasue they don't know til data is entered how long the data will end oup being, but maybe the longest the data turns out to be is 41 characters, you could save space by looking for these types of situations) or set up two tables with a one-to-one relationship and join them to get all the data.

You can leave your table this way and SQL server will accept it, but the first time you try to enter data that is longer than the record can hold, it will fail and you will have unhappy users and their managers breathing down your neck wanting an instant fix. Best to not leave it this way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top