create table o2o
.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,parent_edit_time
datetime default null,
parent_id
int(11) default null,//parent_idint(11)//parent_id
int(11) not null//试过这几个都不行
last_edit_time
datetime default null,
constraint fk_shop_category_self
foreign key(parent_id
)referencestb_shop_category
(shop_category_id
),
primary key(shop_category_id
)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET= utf8;
SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需
了解课程