Be aware that getting the last ID does not guarantee that you know the next ID. If you add a row and then delete it the next ID will be 2 greater than the last rather than 1. As far as I'm aware there is no way to absolutely get the next auto ID. The whole idea of an auto ID is that you don't care what it is, just that it is unique. If you really do care then you might want to look into using a key manager table.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.