【发布时间】:2010-11-01 12:27:33
【问题描述】:
在 MySQL 中,我有一个表,我想将 auto_increment 值设置为 5 而不是 1。这可能吗?这是什么查询语句?
【问题讨论】:
-
你不能改变,只能增加
-
@VasiliiSuricov
You can change this option with ALTER TABLE, but in that case the new value must be higher than the highest value which is present in the AUTO_INCREMENT column.source 如果没有比您要设置的auto_incremented 列更高的值,您也可以减小该值。 (mysql documentation)
标签: mysql