Wednesday, December 23, 2009

How to reset the autoincrement field in MS Access Table

How to reset the autoincrement field in MS Access Table

Many times we use autoicrement field in Ms Access table and we have noticed that the value of autoincrement field keeps on increasing ever if we delete all the rows of the table and add new row.
In order to reset the autoincrement field value back to 1, do the following:

1. Delete all the rows from the table.
2. Compact the whole database .

This will automatically reset the autoincrement value back to 1.

4 comments:

Manab Ranjan Basu said...

Can we write truncate command to reset the auto increment values, on MS Access Database?

Varun Sharma said...

No..I don't think so.. since MS Access does not support truncate..

Grija said...

This is really a great post. Thank you for taking time to provide us some of the useful and exclusive information with us. Keep on blogging!!


Dotnet Training in Chennai

Philips Huges said...


Its very useful to me. Wonderful blog.. Thanks for sharing informative Post.

Installment loans
Payday loans
Title loans