题解 |返回购买 prod_idBR01的所有顾客的电子邮件
返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(二)
https://www.nowcoder.com/practice/c7aa73afc41f4dfc925baebdd175c345
where 简单联结:
select c.cust_email from OrderItems a,Orders b,Customers c where c.cust_id=b.cust_id and a.order_num=b.order_num and a.prod_id ='BR01'
inner join 内联结:
select c.cust_email from Orders b #注意以下两条件中b是公共的 inner join OrderItems a on a.order_num=b.order_num inner join Customers c on c.cust_id=b.cust_id where a.prod_id ='BR01'