1
当我在mssql上执行outer join
时,我加入的列不会合并。外部连接返回多个连接列的副本
这里是我的代码:
select top 10 * from customer_behaviour_1P2014 full outer join
customer_behaviour_2P2014 on customer_behaviour_1P2014.customer_identifier = customer_behaviour_2P2014.customer_identifier full outer join
customer_behaviour_3P2014 on customer_behaviour_2P2014.customer_identifier = customer_behaviour_3P2014.customer_identifier
这将返回3列标记customer_identifier,而不是1
我在做什么错?
如果它有什么不同,我把客户标识符作为每个表中的索引。
有啥选择所有列,并只选择customer_identifier一次的方式吗? – user1871528
@ user1871528,我将其添加到我的答案中。 –