我的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