[SQL]
CREATE TABLE `o2o`.`tb_product`(
`product_id` INT(100) NOT NULL AUTO_INCREMENT,
`product_name` VARCHAR(100) NOT NULL DEFAULT'',
`product_desc` VARCHAR(2000) DEFAULT'',
`img_addr` VARCHAR(2000) DEFAULT'',
`normal_price` VARCHAR(100) DEFAULT NULL,
`promotion_price` VARCHAR(100) DEFAULT NULL,
`priority` INT(2) NOT NULL DEFAULT'0',
`creat_time` datetime DEFAULT NULL,
`last_edit_time` datetime DEFAULT NULL,
`enable_status`INT(2) NOT NULL DEFAULT '0',
`product_category_id` INT(11) DEFAULT NULL,
`shop_id` int(20) not null DEFAULT'0',
PRIMARY key(`product_id`),
CONSTRAINT `fk_product_procate` FOREIGN KEY(`product_category_id`) REFERENCES `tb_prodcut_category`(`product_category_id`),
CONSTRAINT `fk_product_shop` FOREIGN KEY(`shop_id`) REFERENCES `tb_shop`(`shop_id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
[Err] 1005 - Can't create table 'o2o.tb_product' (errno: 150)
SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需
了解课程