Auto Increment after delete in MySQL
What you’re trying to do sounds dangerous, as that’s not the intended use of AUTO_INCREMENT. If you really want to find the lowest unused key value, don’t use AUTO_INCREMENT at all, and manage your keys manually. However, this is NOT a recommended practice. Take a step back and ask “why you need to recycle key … Read more