更改自动递增起始编号? [英] Change auto increment starting number?
本文介绍了更改自动递增起始编号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在MySQL中,我有一个表,我想将auto_increment
值设置为5
而不是1
.这可能吗,这是什么查询语句?
In MySQL, I have a table, and I want to set the auto_increment
value to 5
instead of 1
. Is this possible and what query statement does this?
推荐答案
您可以使用ALTER TABLE
更改auto_increment初始值:
You can use ALTER TABLE
to change the auto_increment initial value:
ALTER TABLE tbl AUTO_INCREMENT = 5;
有关更多信息,请参见 MySQL参考详细信息.
See the MySQL reference for more details.
这篇关于更改自动递增起始编号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文