MySQL DBCC CHECKIDENT syntax error

一曲冷凌霜 提交于 2019-12-11 05:09:43

问题


I'm confused by this syntax error I keep getting when I try to execute:

DBCC CHECKIDENT('database', RESEED, 1)

In PHPMyAdmin...

Error:

#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

The result looks like this


回答1:


DBCC CHECKIDENT('table', RESEED, 1) is for SQL Server.

Use alter table ... auto_increment instead. http://dev.mysql.com/doc/refman/5.0/en/alter-table.html



来源:https://stackoverflow.com/questions/6963363/mysql-dbcc-checkident-syntax-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!