Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 refreshing identity(autonumber) colums data

Author  Topic 

AsimKhaliq
Yak Posting Veteran

94 Posts

Posted - 2004-07-14 : 14:59:12
hi guys
is there any method to refresh the data of identity colums i.e if i have a table and i have autonember field so if i delete all the record i want autonumber to start with 1 again.

thnx in advance

Kristen
Test

22859 Posts

Posted - 2004-07-14 : 15:11:12
DBCC CHECKIDENT (MyTable)
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-14 : 23:41:47
And to be more exact:

DBCC CHECKIDENT(table_name, RESEED,0)


MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -