Suppose I have a table like this:
----Id-------Data---
| 1 | Data1 |
--------------------
| 2 | Data2 |
--------------------
| 3 | Data3 |
--------------------
If I run this query
SELECT MAX(id) FROM table
it will show the result 3 and if i increment it with 1 generally this will be the next auto incremented id.
If i delete the record where id is 3 and after that when i run this query again mean
SELECT MAX(id) FROM table
it will show 2, and if i increment it with 1 then it will be 3. Now if i insert a new record the auto increment id will be 4.
Now my question is how know what would be the next exact auto increment id?