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.

11 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

afiah ahamed said...

Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

Java training in Chennai | Java training institute in Chennai | Java course in Chennai

Java training in Bangalore | Java training institute in Bangalore | Java course in Bangalore

Java online training | Java Certification Online course-Gangboard

Java training in Pune

Akash Thakur said...

ielts coaching in gurgaon

pragya pragya said...

It is better to engaged ourselves in activities we like. I liked the post. Thanks for sharing.

Python training in bangalore
Python course in pune
Python training in bangalore

Ezhil K S said...

Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this. 
Data Science training in chennai | Best Data Science training in chennai
Data Science training in OMR | Data science training in chennai
Data Science training in chennai | Best Data science Training in Chennai
Data science training in velachery | Data Science Training in Chennai
Data science training in tambaram | Data Science training in Chennai
Data Science training in anna nagar | Data science training in Chennai

gowsalya said...

Read all the information that i've given in above article. It'll give u the whole idea about it.
Best Devops training in sholinganallur
Devops training in velachery
Devops training in annanagar
Devops training in tambaram

saranyaregan said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
rpa training in Chennai | rpa training in bangalore | best rpa training in bangalore | rpa course in bangalore | rpa training institute in bangalore | rpa training in bangalore | rpa online training

Revathy said...

Very good brief and this post helped me alot. Say thank you I searching for your facts. Thanks for sharing with us!

angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli

angularjs interview questions and answers