DEV Community

Discussion on: What is the difference between JOIN and INNER JOIN in SQL?

Collapse
 
aminmansuri profile image
hidden_dude • Edited

Hmm.. your statement is a bit ambiguous.

A FULL JOIN is like a LEFT OUTER JOIN and a RIGHT OUTER JOIN together. What it means is that you can get nulls on the left and the right.

The scenario in which I found it necessary to use this feature was when I had a report that had several lists next to it like:

customer, unfinished tasks, accomplishments, opportunities

For each of these columns you can have zero or more items. But in the report you'd want them to look like lists like so:

customer1   1. task1.       1. acc1.     1. opp1
                        2.task2.                         2. opp2
                                                                3. opp3
Enter fullscreen mode Exit fullscreen mode

(hmm.. excuse formatting problems.. my intent was that the lists appear side by side)

Using row number and full join would allow you to write this report.

So if by outer join you mean LEFT and RIGHT outer join I agree with you. But there's a difference between LEFT, RIGHT, and FULL. And INNER is different as the article states.