sql 数据库表标识列初始化 dbcc 把arimaindexforecastmodel这张表的标识列重置为0,前提是这张表执行过删除操作 示例: dbcc checkident('arimaindexforecastmodel',reseed,0) 语法: dbcc checkident ( table_name[, {noreseed | { reseed [,new_reseed_value
sql 数据库表标识列初始化 dbcc
把arimaindexforecastmodel这张表的标识列重置为0,前提是这张表执行过删除操作
示例: dbcc checkident('arimaindexforecastmodel',reseed,0)
语法:
dbcc checkident ( table_name[, { noreseed | { reseed [, new_reseed_value ] } } ])[ with no_infomsgs ]
table_name 表名,必须包含标识列,否则执行报错noreseed 不更改标识列reseed 更改标识列为指定值new_reseed_value 新值with no_infomsgs 不显示执行结果
重置方法:一、表里有数据
1、, reseed, 145)2、直接执行dbcc checkident ('arimaindexforecastmodel', reseed, 0),,然后执行 dbcc checkident ('arimaindexforecastmodel', reseed) 更正一下,就从表里最后一个值+1开始插入数据了二、表里没有数据直接执行dbcc checkident ('arimaindexforecastmodel', reseed, 0)即可,数字0可以替换成别的数字
posted on
