题解 | #检索每个顾客的名称和所有的订单号(一)#
检索每个顾客的名称和所有的订单号(一)
https://www.nowcoder.com/practice/0a876520bd314505b787648e331f5e81
方法一: SELECT C.cust_name, O.order_num FROM Customers AS C INNER JOIN Orders AS O ON O.cust_id = C.cust_id ORDER BY C.cust_name ASC; 方法二: SELECT C.cust_name, O.order_num FROM Customers AS C, Orders AS O WHERE O.cust_id = C.cust_id ORDER BY C.cust_name ASC;