【问】前台结账时报错“插入重复键”? | ||
【适用版本】烘焙之星8 | 【模块】基础业务 | 【点击数】110 |
【知识编号】Z2012112800031 | ||
【问题描述】 |
use issbakev8–可改成相应的数据库名
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