?
Solved

SQL Server 2000 error

Posted on 2009-12-21
5
Medium Priority
?
209 Views
Last Modified: 2013-11-24
I was trying to change the datatype of the column using query below:-

alter table Peak_trans alter column state_01 varchar(11)

so in the output i got

Warning: The table 'Peak_trans' has been created but its maximum row size (8062) 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.

(12510 row(s) affected)

i have never seen this before. any highlight about this friends?
0
Comment
Question by:espanolanthony
  • 2
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 26097395
the maximum size of a  row in  sql server is 8060 bytes, in the case you try to populate more data it will fail. assuming that you trying to resize the column which will exceed the maximum size of the row
0
 
LVL 1

Author Comment

by:espanolanthony
ID: 26097472
so can i ignore it or anything that i have to do?
0
 
LVL 43

Expert Comment

by:pcelba
ID: 26097494
It is just a warning. If the size of data in your varchar columns (plus all fixed length columns) exceeds the maximum row capacity then it will raise error. Shorter data can be stored without problems.

SQL Server 2005 does not have this limit because it stores long varchar data "out of rows".
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 26097580
>so can i ignore it or anything that i have to do?
yes, but its is goog practice to redesign the table
0
 
LVL 1

Author Closing Comment

by:espanolanthony
ID: 31668595
thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Viewers will learn how the fundamental information of how to create a table.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question