【问题描述】
前台收银提示数据保存失败
【问题答案】
–请在查询分析器中执行下面语句修复自增列,一次性检查并修复所有带自增列的表
use hbposv6 –可改成相应的数据库名
go
declare @tablename varchar(100)
declare test_cur cursor for
select object_name(id) from syscolumns
where status=128
open test_cur
fetch test_cur into @tablename
while @@fetch_status=0
begin
DBCC CHECKIDENT (@tablename, RESEED)
fetch test_cur into @tablename
end
close test_cur
deallocate test_cur
go