Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset autonumber to 1

Status
Not open for further replies.

firsttime

Technical User
Oct 1, 2002
22
0
0
NL
Hi,

I just made a database. During that time i tested it too. My problem is that the primary key from the table just add up the number. I want it to start at 1 again.

Example:

I just deleted all the records from the table order. When i want to add a new order the orderid start at 6 (because i tested it before).I want the orderid to start at 1 again.

THX in advance
 
The only way I know to restart is to change the name of the table and make a new one with old name and no data. Then compress the database and auto... will go back to zero. If you need to keep any of your old data, delete the autonumber field and append the old data to the new table. Messy, huh???

rollie@bwsys.net
 
All you have to do is compact the database. That will reset the number back to zero. Your first autonumber will then be 1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top