【错误】
设计店铺类别数据库表
create table `tb_shop_category`(
`shop_category_id` int(11) not null auto_increment,
`shop_category_name` varchar(100) not null default '',
`shop_category_desc` varchar(1000) default '',
`shop_category_img` varchar(2000) default null,
`priority` int(2) not null default '0',
`create_time` datetime default null,
`last_edit_time` date default null,
`parent_id` int(11) default null,
PRIMARY key(`shop_category_id`)
constraint `fk_shop_category_self` foreign key(`parent_id`) references `tb_shop_category`
(`shop_category_id`)
)ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=UTF8;
报错
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 'constraint `fk_shop_category_self` foreign key(`parent_id`) references `tb_shop_' at line 11