January 21, 2009 at 7:10 am
Currently I have a column that is varchar(720) and when I run my alter table script I get a warning message.
alter table dbo.tblJobs
alter column SupportStructure varchar(1024)
I get this warning message:
Warning: The table 'tblJobs' has been created but its maximum row size (10142) 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.
I cant find a straight answer while googling. Can someone explain what it actually means? Does it means that when I do an insert or update of any size will fail?
January 21, 2009 at 9:16 am
It goes back to knowing your data types and how much space each "Column" takes.
Char(100) is 100 Bytes no matter how many characters you put in the field
But a varchar(1000) uses 0 thru 1000 bytes. depending on how long the string you put in is.
So the warning is telling you if you add up all the space required for all your columns it is over 8000 bytes, but it will only fail if the sum of all your columns is greater than 8000.
January 21, 2009 at 9:41 am
Hmmm, thats not good. This table design is poor and pretty much looks like an excel spreadsheet dumped into a table with no normalization done at all. Unfortunately its the main table in this application so normalizing it now would be a horrible task.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply