今天在往测试数据库导入数据时,其中一个商品类目表报USING BTREE 错误:
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 'USING BTREE,
其实解决这个问题很简单。
打开要导入的文件在里面搜索 BTREE 找到如下内容
UNIQUE KEY `parent_id` (`parent_id`,`status`) USING BTREE ,修改为
UNIQUE KEY `parent_id` USING BTREE (`parent_id`,`status`) ,
即把USING BTREE 放到索引字段前面即可.
再次导入顺利通过了