Reseed the Identity field in ms sql server

DBCC checkident (Customer, RESEED, 3)

Reseed the Identity field

You can also reseed the identity field value. By doing so identity field values will start with a new defined value.

Suppose you want to reseed the Customer table ID field from 3 then the new record s will be inserted with ID 4,5,6..and so on.

--Reseeding the identity
DBCC checkident (tbluser, RESEED, 3)

INSERT INTO tbluser(Name,Address) VALUES('Geeta','Noida')

 

 

Reset autoincrement value from specific value

Reset Identity column value


Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM