admin

MySQL DBCC CHECKIDENT语法错误

sql

当我尝试执行时,我不断收到以下语法错误,我对此感到困惑:

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

结果看起来像这样 在此处输入图片说明


阅读 228

收藏
2021-07-01

共1个答案

admin

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

使用alter table ... auto_increment代替。http://dev.mysql.com/doc/refman/5.0/en/alter-
table.html

2021-07-01