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)
 About autoincrement

Author  Topic 

clip
Starting Member

5 Posts

Posted - 2005-01-04 : 10:22:01
Sometimes my tables will be cleanned by an option of my application, but I need to reset my autoincrement fields...What can I do???

TimS
Posting Yak Master

198 Posts

Posted - 2005-01-04 : 10:25:52
DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)

SEE Books Online BOL for details

Tim S
Go to Top of Page

clip
Starting Member

5 Posts

Posted - 2005-01-04 : 10:43:13
Thanks but I'm working in MySQL Query Browser and the script you send me doesn't work, thanx a lot anyway...
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-01-06 : 06:48:45
Truncate table Tablename
Go to Top of Page

clip
Starting Member

5 Posts

Posted - 2005-01-06 : 09:20:50
How can I truncate the table from a certain record on..?
Go to Top of Page
   

- Advertisement -