开发者

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?


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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜