1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Merge pull request #1956 from MisakaWater/main

Update sql-questions-01.md
This commit is contained in:
Guide 2023-03-16 15:55:48 +08:00 committed by GitHub
commit 5780c46f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1292,13 +1292,13 @@ order by c.cust_name;
select c.cust_name, o.order_num select c.cust_name, o.order_num
from Customers c, Orders o from Customers c, Orders o
where c.cust_id = o.cust_id where c.cust_id = o.cust_id
order by c.cust_name; order by c.cust_name,o.order_num;
# 显式内连接 # 显式内连接
select c.cust_name, o.order_num select c.cust_name, o.order_num
from Customers c inner join Orders o from Customers c inner join Orders o
using(cust_id) using(cust_id)
order by c.cust_name; order by c.cust_name,o.order_num;
``` ```
### 返回顾客名称和相关订单号以及每个订单的总价 ### 返回顾客名称和相关订单号以及每个订单的总价