CREATE table shop(
`id` int PRIMARY key auto_increment,
`name` VARCHAR(20)not null,
`create_date` date not null,
`describe` double ,
`service` double ,
`logistics` double
);
INSERT INTO shop values (null,'极有家','2002-02-02',4.9,4.8,4.2);
2.2 商品表
CREATE table goods(
`id` int PRIMARY key auto_increment,
`name` VARCHAR(20)not null,
`describe` VARCHAR(100),
`shop_id` int
);
INSERT INTO goods values (null,'毛巾','2条装 三利毛巾纯棉成人家用全棉柔软吸水男女情侣加厚洗脸不掉毛',1);
2.3 商品分类表
CREATE table sku(
`id` int PRIMARY key auto_increment,
`name` VARCHAR(20)not null,
`price` double not null,
`stock` int not null,
`goods_id` int
);
INSERT into sku values (null,'粉色+蓝色(2条)',22.9,92,1);
INSERT into sku values (null,'粉色+棕色(2条)',22.9,111,1);
INSERT into sku values (null,'蓝色+灰色+绿色(3条)',29.9,157,1);