1064 - syntax error, error in :'Id`) USING BTREE

Posted laoer

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1064 - syntax error, error in :'Id`) USING BTREE相关的知识,希望对你有一定的参考价值。

mycat执行如下脚本报错 :1064 - syntax error, error in :‘Id`) USING BTREE

DROP TABLE IF EXISTS `score`;
CREATE TABLE `score` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`grade` int(11) NULL DEFAULT NULL,
`Remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
PRIMARY KEY (`Id`)  USING BTREE,
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;

 

解决方法,将最后两句更改为

DROP TABLE IF EXISTS `score`;
CREATE TABLE `score` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`grade` int(11) NULL DEFAULT NULL,
`Remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `Id` USING BTREE(`Id`)
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;

以上是关于1064 - syntax error, error in :'Id`) USING BTREE的主要内容,如果未能解决你的问题,请参考以下文章

1064 - You have an error in your SQL syntax;

Mysql错误 ERROR 1064 (42000): You have an error in your SQL syntax

解决mysql 8报错 ERROR 1064 (42000): You have an error in your SQL syntax

解决mysql 8报错 ERROR 1064 (42000): You have an error in your SQL syntax

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual ...

解决——》ERROR 1064 (42000)You have an error in your SQL syntax; check the manual that corresponds