MySQL DBCC CHECKIDENT语法错误

时间:2011-08-05 22:40:17

标签: mysql sql syntax phpmyadmin xampp

我对尝试执行时遇到的语法错误感到困惑:

DBCC CHECKIDENT('database', RESEED, 1)

PHPMyAdmin ...

错误:

#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 'DBCC CHECKIDENT('database', RESEED, 1)' at line 1

结果如下所示 enter image description here

1 个答案:

答案 0 :(得分:3)

DBCC CHECKIDENT('table', RESEED, 1)适用于SQL Server。

请改用alter table ... auto_incrementhttp://dev.mysql.com/doc/refman/5.0/en/alter-table.html