I have an integer field set identity ON. How can I reset the identity number
to 1? Thanks Anyway!
You need to use the DBCC CHECKIDENT command. DBCC CHECKIDENT(TableName,
RESEED, IdentityValue)
ie. To reseed the Identity of the Employees table to 0:
DBCC CHECKIDENT(employees, RESEED, 0)
- Peter Ward
WARDY IT Solutions
"kinloan" wrote:
> I have an integer field set identity ON. How can I reset the identity number
> to 1? Thanks Anyway!
>
Showing posts with label numberto. Show all posts
Showing posts with label numberto. Show all posts
Friday, March 23, 2012
reset Identity
I have an integer field set identity ON. How can I reset the identity number
to 1? Thanks Anyway!You need to use the DBCC CHECKIDENT command. DBCC CHECKIDENT(TableName,
RESEED, IdentityValue)
ie. To reseed the Identity of the Employees table to 0:
DBCC CHECKIDENT(employees, RESEED, 0)
- Peter Ward
WARDY IT Solutions
"kinloan" wrote:
> I have an integer field set identity ON. How can I reset the identity numb
er
> to 1? Thanks Anyway!
>sql
to 1? Thanks Anyway!You need to use the DBCC CHECKIDENT command. DBCC CHECKIDENT(TableName,
RESEED, IdentityValue)
ie. To reseed the Identity of the Employees table to 0:
DBCC CHECKIDENT(employees, RESEED, 0)
- Peter Ward
WARDY IT Solutions
"kinloan" wrote:
> I have an integer field set identity ON. How can I reset the identity numb
er
> to 1? Thanks Anyway!
>sql
Subscribe to:
Posts (Atom)