加入子查询服务时间

时间:2018-11-08 18:55:19

标签: join db2 subquery

我有运行的代码:

如何在此子查询中加入另一个查询? 我希望第三张桌子与其他桌子相连。 我该如何实现?

Future.isDone()

1 个答案:

答案 0 :(得分:0)

将原始查询括在方括号中:

select *
from 
(
-- your original query follows below
  select *
  from 
  (
  select columns_for_outer_join, other_columns
  from ...
  ) as antalLev 
  full join
  ( 
  select columns_for_outer_join, other_columns
  from ...
  ) as antalBest on  antalLev.irart = antalBest.raart
-- end of your original query
) a
join (
-- your another sub-query comes here
select columns_for_outer_join, other_columns
from ...
-- end of your another sub-query
) b on <a.columns_for_outer_join = b.columns_for_outer_join>
...;