2 qq 39812963 qq_39812963 于 2017.09.01 20:50 提问

MySQL数据库运行从数据库中导出的sql报错,怎么回事

我的sql

SET FOREIGN_KEY_CHECKS=0;


-- Table structure for tb_item_cat


DROP TABLE IF EXISTS tb_item_cat;
CREATE TABLE tb_item_cat (
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '类目ID',
parent_id bigint(20) DEFAULT NULL COMMENT '父类目ID=0时,代表的是一级的类目',
name varchar(50) DEFAULT NULL COMMENT '类目名称',
status int(1) DEFAULT '1' COMMENT '状态。可选值:1(正常),2(删除)',
sort_order int(4) DEFAULT NULL COMMENT '排列序号,表示同级类目的展现次序,如数值相等则按名称次序排列。取值范围:大于零的整数',
is_parent tinyint(1) DEFAULT '1' COMMENT '该类目是否为父类目,1为true,0为false',
created datetime DEFAULT NULL COMMENT '创建时间',
updated datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (id),
KEY parent_id (parent_id,status) USING BTREE ,
KEY sort_order (sort_order)
) ENGINE=InnoDB AUTO_INCREMENT=1183 DEFAULT CHARSET=utf8 COMMENT='商品类目';

报的错:
[Err] 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 'USING BTREE ,
KEY sort_order ([sort_order])
) ENGINE=InnoDB AUTO_INCREM' at line 11

1个回答

devmiao
devmiao   Ds   Rxr 2017.09.01 23:56
Csdn user default icon
上传中...
上传图片
插入图片