Hi gurus,
Does anyone know how to reset the counter of an auto increment field without
deleting the table?
Thanx in advance..
Boristry
dbbc checkident with the reseed option... It is doc'd in books on line.
--
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
"Boris Condarco" <bcondarco@.hotmail.com> wrote in message
news:uiGBrAU0DHA.2360@.TK2MSFTNGP10.phx.gbl...
> Hi gurus,
> Does anyone know how to reset the counter of an auto increment field
without
> deleting the table?
> Thanx in advance..
> Boris
>|||If there is no data to keep, TRUNCATE TABLE tablename
"Boris Condarco" <bcondarco@.hotmail.com> wrote in message
news:uiGBrAU0DHA.2360@.TK2MSFTNGP10.phx.gbl...
> Hi gurus,
> Does anyone know how to reset the counter of an auto increment field
without
> deleting the table?
> Thanx in advance..
> Boris
>|||DBCC CHECKIDENT (TestTable, RESEED, 1)
Rohtash Kapoor
http://www.sqlmantra.com
"Boris Condarco" <bcondarco@.hotmail.com> wrote in message
news:uiGBrAU0DHA.2360@.TK2MSFTNGP10.phx.gbl...
> Hi gurus,
> Does anyone know how to reset the counter of an auto increment field
without
> deleting the table?
> Thanx in advance..
> Boris
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment