做如下更新时,
UPDATE t
SET col= 'Stokke KEEP Complete-Cherry'
where ... -- 符合条件的只有一笔记录.
Msg 511, Level 16, State 1, Procedure xxx, Line 170
Cannot create a row of size 8062 which is greater than the allowable maximum row size of 8060.
查该t.col字段数据类型为varchar(500),且表中所有字段长度总和亦远小于8060,
后跟User联系确认该表曾有个xml字段,后来删除了.
估计是空间分配未回收问题(仅是估计),做表索引重建,问题解决.
DBCC DBREINDEX('t', '', 90)
if object_id('ta') is not null
drop table ta
go
create table ta(id int identity primary key, col1 char(8000), col2 char(40), col3 varchar(20))
go
insert into ta
values('col1', 'col2', '12')
go
select * from ta
go
update ta
set col3='1234567890'
go
select * from ta
go
alter table ta
drop column col1
go
select * from ta
go
update ta
set col3='1234567890'
go
dbcc dbreindex('ta', '', 90)
go
update ta
set col3='1234567890'
go
select * from ta
go
http://topic.csdn.net/u/20111107/09/4D3A2D90-33EB-49F2-9710-F119BD04EE62.html