数据库修复自增列语句: use hbposv8 ----分店改为hbposv8_branch 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