# How to reset the auto\_increment vlaue of a column whenever we truncate table

**URL:** <https://www.singlestore.com/forum/t/how-to-reset-the-auto-increment-vlaue-of-a-column-whenever-we-truncate-table/1899>\
**Category:** Procedural SQL\
**Created:** [April 30, 2020, 3:08am UTC](https://www.singlestore.com/forum/t/how-to-reset-the-auto-increment-vlaue-of-a-column-whenever-we-truncate-table/1899 "2020-04-30T03:08:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [April 30, 2020, 10:59pm UTC](https://www.singlestore.com/forum/t/how-to-reset-the-auto-increment-vlaue-of-a-column-whenever-we-truncate-table/1899/2 "2020-04-30T22:59:35Z")

</div>

MemSQL doesn’t support a way to reset the auto\_increment values. Why don’t you want to drop the table and recreate it, given that you are deleting all the data anyway?

This post talks about how to create your own sequence generator using an auto\_increment on a reference table, but of course it is not fully general. It might work for some apps.

> **[Sequence Generator in MEMSQL](https://www.singlestore.com/forum/t/sequence-generator-in-memsql/397)**
>
> We are migrating from Netezza to MEMSQL. However, The sequence generator is integral part of Netezza and it is extensively used in my project. I dont see the corresponding equivalent in MEMSQL. Can someone please suggest How we can go ahead and...

---

_[View the full topic](https://www.singlestore.com/forum/t/how-to-reset-the-auto-increment-vlaue-of-a-column-whenever-we-truncate-table/1899)._
