输入此命令时出错ALTER TABLE`report`AUTO_INCREMENT = 1

时间:2013-08-22 05:10:39

标签: mysql

使用此命令更改我的SQL表时出现错误

错误讯息:

#1064 - You have an error in your SQL syntax;  
check the manual that corresponds to your MySQL server version for the right   
syntax to use near 'ALTER TABLE `report` AUTO_INCREMENT = 1, 30' at line 2`

有什么想法吗?

1 个答案:

答案 0 :(得分:5)

那你为什么要说AUTO_INCREMENT=1,30

必须是一个数字,而不是以逗号分隔的数字列表。

ALTER TABLE report AUTO_INCREMENT=1

ALTER TABLE report AUTO_INCREMENT=30

参考:MySQL