开发者

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

开发者 https://www.devze.com 2023-03-25 10:36 出处:网络
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?It is the next value that will be inserted, so in your example the auto

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?


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


Actually may be you should use show create table ur_table_name; to see the value of AUTO_INCREMENT , while this will indicate which value will be used for next insert.

0

精彩评论

暂无评论...
验证码 换一张
取 消