SQL连接概念-性能调整

问题描述

在下面的teradata sql代码中,我想将表A (col1,col2,col3)中的3个不同列与员工表的 name 列连接在一起。以下操作正常,但希望在一个连接内执行此操作, 我们可以通过另一种方法来避免在同一张表上进行多次联接吗?由于视图多次联接,我遇到了后台打印空间错误

Select (case when P.name is not null then A.col1 else null end)name1,(case when Q.name is not null then A.col2 else null end)name2,(case when R.name is not null then A.col3 else null end)name3
From A Left join
     employee P
     on P.name = A.col1 Left join
     employee Q
     on Q.name = A.col2 Left join
     employee R on R.name = A.col3

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)