题解 | #检索每个顾客的名称和所有的订单号(二)#
检索每个顾客的名称和所有的订单号(二)
http://www.nowcoder.com/practice/4e73c4e770b941c9abc60814601ed498
#左关联 SELECT c.cust_name, o.order_num FROM Customers c LEFT JOIN Orders o USING(cust_id) ORDER BY c.cust_name #右关联 SELECT c.cust_name, o.order_num FROM Orders o RIGHT JOIN Customers c USING(cust_id) ORDER BY cust_name