错误:FULL JOIN仅支持merge-joinable或hash-joinable join条件

时间:2016-05-16 18:04:35

标签: sql postgresql

我正在尝试进行查询以从表中获取所有细节,使得没有两个字段(s / p / j)位于同一个城市。

select 
     S.s
     ,PJ.p
     ,PJ.j
from date.s S
     full outer join(
          select 
               P.p as p
               ,P.city as pcity
               ,J.j as j
               ,J.city as jcity
          from date.p P
               full outer join date.j J on P.city = J.city where J.city is null 
     )as PJ on S.city = PJ.pcity or S.city = PJ.jcity
where 
     PJ.pcity is null 
     or PJ.jcity is null

但是,执行上面的代码时会出现此错误

  

错误:只有merge-joinable或支持FULL JOIN   hash-joinable join条件

0 个答案:

没有答案