Home > Archive > MS SQL Server > November 2005 > reset Identity









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author reset Identity
kinloan

2005-11-30, 3:23 am

I have an integer field set identity ON. How can I reset the identity number
to 1? Thanks Anyway!
P. Ward

2005-11-30, 3:23 am

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!
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com