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
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn