Search code examples
mysqlrowauto-increment

Is mysql auto increment for the next number or the current number?


So, say I have 4 rows

1 | Matt  
2 | Jack  
3 | Mike  
4 | Josh

what would the the auto increment value be? 4 or 5?


Solution

  • It is the next value that will be inserted, so in your example the auto increment value would be 5.