reseed

Tech

Registered User.
Local time
Today, 20:22
Joined
Oct 31, 2002
Messages
267
in MS Access, is there a command like SQL which resets the Identity seed? I need to know this as after i remove all the records, would like the ID reset back to 0
 
There are several autonumber questions and answers in the TABLES page. Try there.
 
thanks i will look for them but im trying to do this from .NET and would like the actual SQL/command for it. I know there are links to other pages but not quite what I had in mind.
 
Thanks. I found out the code/syntax

ALTER TABLE [tableName] ALTER Column [PKColumn] COUNTER(0, 1)

this will reset the seed to 0 incrementing by 1 on every new insert on the given fieldname/PK field

I just wanted to find out how to reset the seed after deleting all records so it starts seeding from 0 going up by 1

:)
 

Users who are viewing this thread

Back
Top Bottom