I have a db where each entry gets a unique id number thanks to an auto_increment. There are times when some of the entries get deleted for various reasons which leaves a gap in the ascending numbers (1, 2, 3, 6, 10, 11, 15, etc.). For the most part this isn't a major problem, but there are a few things in which being able to recover those unused numbers would be nice; in the case of my example, moving #6 to be #4, #10 to #5, and so on.
The db I'm using at the moment is mysql, but I haven't found any docs talking about a way to do this. Is this in the territory of a shell script maybe?
The db I'm using at the moment is mysql, but I haven't found any docs talking about a way to do this. Is this in the territory of a shell script maybe?