Reset a mysql table auto-increment to 1 in phpMyAdmin
ALTER TABLE tablename AUTO_INCREMENT = 1
How to set initial value and auto increment in MySQL?
Use this:
ALTER TABLE Tablename AUTO_INCREMENT=2001;
or if you haven't already added an id column, also add it
ALTER TABLE users ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ADD INDEX (id);
No comments:
Post a Comment