How to get full outer join in TimesTen

59 views Asked by At

How do I get full outer join in TimesTen DB?

I tried this:

select t1.column1, t2.column2 
from table1 t1 
full outer join table2 t2 on t1.column1 = t2.column2;

This works in Oracle but when I run it against TimesTen it throws an error, that there is problem before "full".

1

There are 1 answers

1
Jakub Znamenáček On

It looks like full outer join is not supported in TimesTen based on the documentation (page 547). I have found alternative which returns same result using left join, right join and union.

select *
from (
        select t1.column1, t2.column2 
        from table1 t1 
            left join table2 t2 on t1.column1 = t2.column2
        union
        select t1.column1, t2.column2 
        from table1 t1 
            right join table2 t2 on t1.column1 = t2.column2
     )