Saturday, July 25, 2015

Reseeding Identity

After truncate, identity becomes 1 by default.

TRUNCATE TABLE dbo.Customer

You can check by

SELECT IDENT_CURRENT('dbo.Customer')


It is possible to reseed to different value. For example 4

DBCC CHECKIDENT('dbo.Customer',RESEED,4)


Check again.

SELECT IDENT_CURRENT('dbo.Customer')

No comments:

Post a Comment