【发布时间】:2016-07-12 18:09:19
【问题描述】:
我有三个表 - A、B 和 C,每个表分别包含 2012、2013 和 2014 年的活跃客户列表。我想获得在所有三年中都很活跃的客户列表。我是这样做的:
select distinct customer_id
from table_A a
inner join table_B b on a.customer_id=b.customer_id
inner join table_C c on a.customer_id=c.customer_id
但这会产生与此不同的结果吗:
select distinct customer_id
from table_A a
inner join table_B b on a.customer_id=b.customer_id
inner join table_C c on b.customer_id=c.customer_id
谢谢!
【问题讨论】: