题解 | #检索每个顾客的名称和所有的订单号(一)#
检索每个顾客的名称和所有的订单号(一)
http://www.nowcoder.com/practice/0a876520bd314505b787648e331f5e81
- 使用两张表的公共字段,进行正常的内连接即可。
select cust_name, order_num
from Customers c join Orders o on c.cust_id=o.cust_id
order by cust_name;
检索每个顾客的名称和所有的订单号(一)
http://www.nowcoder.com/practice/0a876520bd314505b787648e331f5e81
select cust_name, order_num
from Customers c join Orders o on c.cust_id=o.cust_id
order by cust_name;
相关推荐