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
 General SQL Server Forums
 New to SQL Server Programming
 Reset key field to 1 RESOLVED

Author  Topic 

Pinto
Aged Yak Warrior

590 Posts

Posted - 2006-11-29 : 10:22:17
I have test tables with key fields that increment by one each time a record is added. If I delete all the records in a table (using a delete query) is there a way I can make the key start at 1 again.

The reason I ask is that by using test data in these tables (and there are a lot of records),when I clear them out and append the live data the key field starts at something like 764525

Pinto
Aged Yak Warrior

590 Posts

Posted - 2006-11-29 : 11:39:21
DBCC CHECKIDENT(tblSL_Calls,RESEED,200000)
Go to Top of Page
   

- Advertisement -