Re: Idendity column on MS SQL
- From: "Yorai Aminov (TeamB)" <yaminov@xxxxxxxxx>
- Date: 18 Jul 2008 22:09:16 -0700
Eugene V. Goldberg wrote:
Is there a way to set Idendity column seed back to 1 on existing
table after all the rows are deleted?
Use the DBCC CHECKIDENT statement:
http://msdn.microsoft.com/en-us/library/ms176057.aspx
You can also use TRUNCATE TABLE to delete all rows and reset the
identity counter.
--
Yorai Aminov (TeamB)
(TeamB cannot answer questions received via email.)
Shorter Path - http://www.shorterpath.com
Yorai's Page - http://www.yoraispage.com
.
- Follow-Ups:
- Re: Idendity column on MS SQL
- From: Eugene V. Goldberg
- Re: Idendity column on MS SQL
- From: Eugene V. Goldberg
- Re: Idendity column on MS SQL
- References:
- Idendity column on MS SQL
- From: Eugene V. Goldberg
- Idendity column on MS SQL
- Prev by Date: Idendity column on MS SQL
- Next by Date: Re: Idendity column on MS SQL
- Previous by thread: Idendity column on MS SQL
- Next by thread: Re: Idendity column on MS SQL
- Index(es):