Verified Commit 64e6852b authored by Kiryuu Sakuya's avatar Kiryuu Sakuya 🎵
Browse files

Add

parent 13e02a1c
......@@ -24,11 +24,14 @@ create table customer (
cust_id char(5) not null comment "客户号",
cust_name char(20) not null comment "客户名称",
addr char(40) not null comment "客户住址",
tel_no char(10) not null comment "客户电话",
zip char(6) not null comment "邮政编码",
tel_no char(15) not null comment "客户电话",
zip char(8) not null comment "邮政编码",
PRIMARY KEY (cust_id)
);
# 更改字段名称及类型可以用
# ALTER TABLE table_name CHANGE old_field_name new_field_name field_type;
create table sale_item (
order_no int not null comment "订单编号",
prod_id char(5) not null comment "产品编号",
......@@ -40,6 +43,6 @@ PRIMARY KEY (order_no, prod_id)
create table product (
prod_id char(5) not null comment "产品编号",
prod_name char(20) not null comment "产品名称",
prod_name char(50) not null comment "产品名称",
PRIMARY KEY (prod_id)
);
\ No newline at end of file
......@@ -36,3 +36,65 @@ UPDATE employee SET emp_mod_date=NOW() where emp_no="10000";
DELETE FROM employee WHERE emp_no="10000";
# delete from deleteRowDemo where StudentName='' OR StudentName IS NULL;
```
### 客户表
| 客户号 | 客户名称 | 客户住址 | 客户电话 | 邮政编码 |
| :--- | --- | --- | --- | ---: |
| 100000 | 张三丰 | 江西省景德镇市浮梁县湘湖镇景德镇陶瓷大学湘湖校区 | +86199484935556 | 333403 |
| 100001 | 高濑智章 | 日本秋田県横手市十文字町西原二番町 | +81976313164 | 127-1196 |
#### 示例代码
```mysql
INSERT INTO customer (
cust_id, cust_name, addr, tel_no, zip
) VALUE (
"100000", "张三丰", "江西省景德镇市浮梁县湘湖镇景德镇陶瓷大学湘湖校区", "+86199484935556", "333403"
), (
"100001", "高濑智章", "日本秋田県横手市十文字町西原二番町", "+81976313164", "127-1196"
);
```
### 销售主表
| 订单编号 | 客户号 | 业务员编号 | 订单金额 | 订货日期 | 出货日期 | 发票号码 |
| :--- | --- | --- | --- | --- | --- | ---: |
| 11035462019090116054034524 | 100000 | 10001 | 56.5 | 2019-09-01 16:05:40 | 2019-09-01 18:23:02 | 34600350 |
| 11035462019090211345678134 | 100001 | 10002 | 2510 | 2019-09-02 11:34:56 | 2019-09-04 13:01:22 | 34600352 |
#### 示例代码
### 销货明细表
| 订单编号 | 产品编号 | 销售数量 | 单价 | 订单日期 |
| :--- | --- | --- | --- | ---: |
| 11035462019090116054034524 | T0001 | 1 | 56.5 | 2019-09-01 16:05:40 |
| 11035462019090211345678134 | D0002 | 5 | 502 | 2019-09-02 11:34:56 |
#### 示例代码
### 产品名称表
| 产品编号 | 产品名称 |
| :--- | ---: |
| T0001 | 海飞丝去屑洗发露止痒呵护型 750ml 促销款 |
| T0002 | 舒肤佳柠檬清香健康+清爽系列沐浴露 400ml |
| D0001 | このはな綺譚 dアニメストア Prime Video 12 集全 WEB-DL |
| D0002 | うらら迷路帖 千箭限量版1/8比例PVC制已涂装完成品手办 |
#### 示例代码
```mysql
INSERT INTO product (
prod_id, prod_name
) VALUE (
"T0001", "海飞丝去屑洗发露止痒呵护型 750ml 促销款"
), (
"T0002", "舒肤佳柠檬清香健康+清爽系列沐浴露 400ml"
), (
"D0001", "このはな綺譚 dアニメストア Prime Video 12 集全 WEB-DL"
), (
"D0002", "うらら迷路帖 千箭限量版1/8比例PVC制已涂装完成品手办"
);
```
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment