Reputation: 1573
I have data in a table, but am working on data loading. I want to reseed all new inserts for testing.
What would be the line to set all new inserts to a certain seed value?
Upvotes: 0
Views: 133
Reputation: 103587
For SQL Server use: DBCC CHECKIDENT (Transact-SQL)
DBCC CHECKIDENT
(
table_name
[ , { NORESEED | { RESEED [ , new_reseed_value ] } } ]
)
[ WITH NO_INFOMSGS ]
example:
USE YourDatabase;
GO
DBCC CHECKIDENT (YourTable, RESEED, 300);
GO
Upvotes: 7