`

1064 - You have an error in your SQL syntax; check the manual that corresponds

阅读更多
错误信息:

mysql> DROP INDEX idx-ipt ON sf_ipt_exam_item;
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 '-ipt ON sf_ipt_exam_item' at line 1
mysql>


错误原因是语法问题,SQL语句中存在'-'符号,需要用'`'包裹,正确语法如下:

mysql> DROP INDEX `idx-ipt` ON `sf_ipt_exam_item`;
Query OK, 0 rows affected
Records: 0  Duplicates: 0  Warnings: 0

mysql>


MySQL查询索引语句:
SHOW INDEX FROM `sf_ipt_exam_item`
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics