Hello,
I have a database table that I will delete all the
contents from regularly. I have an identity column that
I would like to start counting from 1 after deleting all
the records. However it keeps counting from the last
number it used even though all the records are deleted.
Is there anyway to reset the Identity number.
Thanks!Either truncate the table ( it will automatically be reset)
or
DBCC checkident with a reseed parameter ( this is doc'd in books online..
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Chuck" <anonymous@.discussions.microsoft.com> wrote in message
news:2bd401c4287c$8a1ba5e0$a601280a@.phx.gbl...
> Hello,
> I have a database table that I will delete all the
> contents from regularly. I have an identity column that
> I would like to start counting from 1 after deleting all
> the records. However it keeps counting from the last
> number it used even though all the records are deleted.
> Is there anyway to reset the Identity number.
> Thanks!
No comments:
Post a Comment