This is my table with id field as unsigned tinyint PRIMARY KEY with NOT NULL and AUTO_INCREMENT.
+----+
| id |
+----+
| 1 |
| 4 |
|254 |
|255 |
+----+
My application is an embedded application so I am using the small datatypes like tinyint. My total count of id values wont go upto 255. But in case if the in between values are deleted for number of times then inserting the new id value will definitely reach 255 sooner or later.
I have some questions,
Is it possible to set the auto increment feature such that it will be insert the new id to the not existing greater value (here 2)?
If not please suggest some way to handle this issue other than using higher data type for id and updating the higher id values after deleting an id (like if I delete id = 2 update all the id values greater than 2 to id-1 so that all the values remain in sequence while inserting new value).