When creating a MySQL database, how can I modify the auto_increment option so that the number can start from the last one?
For example, I now have a table which is created from this query.
CREATE TABLE tablename (uid int(11) primary key auto_increment, ... );
If I add data into this table consecutively, each data will have its own uid starting from 1. If I delete the last data with the uid value of 3 and add another new data, the new one will have the uid value of 4, not 3.
I want to know how to make that new data have 3 for the uid.