How to reset the auto_increment vlaue of a column whenever we truncate table

We have a table as below. While deleting the records,we will capture the records into this table. To generate the id value we are using ‘auto_increment’ column. We will truncate this table weekly once. How to reset the auto_increment values from the number 1 again whenever we truncated the table.(We don’t want to drop and recreate the table.)

CREATE TABLE IF NOT EXISTS endpoints_audit
(id int auto_increment ,
model varchar(100) not null,
.
.
.
.
.
.’
created_on timestamp default now(),
KEY (model,id) USING CLUSTERED COLUMNSTORE
)

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.