#左关联 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

#左关联 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