更改自动增量起始编号?
2021-11-20 00:00:00
mysql
在 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 参考了解更多详情.
相关文章