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
)