Possible duplicate:Reset primary key in mysql?
Is there any solution when I
delete from t1;
and then insert objects so the identifier starts again with id = 1?
insert into t1 values(...);
[...] then insert objects so the identifier starts again with id = 1?
You can ALTER TABLE as follows:
ALTER TABLE
ALTER TABLE t1 AUTO_INCREMENT = 1;
Documentation here: MySQL ALTER TABLE Syntax
Try trimming the table http://dev.mysql.com/doc/refman/5.1/en/truncate-table.html
Resets auto_increment columns back to 0.