How to do full outer joins in sql lite on multiple tables? it is not supported, but is there another way to get the same result?
Asked
Active
Viewed 426 times
1 Answers
0
A general replacement for full join
is:
select a.*, b.*. -- or whatever columns you want
from a left join
b
on <whatever>
union all
select a.*, b.*. -- same columns as above
from b left join
a
on <same whatever>
where a.id is null -- or some columns that represents a non-match
Note: This does not use union
because that would remove duplicates and not be equivalent to full join
.

Gordon Linoff
- 1,242,037
- 58
- 646
- 786
-
-
@sg_sg94 . . . (1) I doubt you really need full joins on five tables. (2) You should ask a new question with sample data, desired results, and an explanation of what you want to accomplish. (3) The answer to the question in your comment is to use CTEs and just add more tables incrementally. – Gordon Linoff Nov 03 '20 at 13:20