有问题文章留言 看内容决定收费与免费
另外接收数据库质疑 勒索病毒数据恢复等项目。

专卖9使用报错:违反了primary key约束

【问题描述】

违反了primary key约束

【答】

此问题可能为索引问题,请执行如下语句,修复索引自增列后即可:

use isszmv9 
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

赞(0)
未经允许不得转载:思迅软件知识库 » 专卖9使用报错:违反了primary key约束

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址