@nzarar 17,
Here's the deal with outer joins (personally, I prefer to call them uneven joins).
Let's create 2 tables in a database for addresses. One table is
Family. The other is called
Friends.
Let's give it a primary key of ID_number.
How do you find people in both tables? You just do a regular old even join of Friends.ID_number = Family.ID_number.
But!
The tables are a lot bigger than that. If you want to show everyone, but with no duplicate rows, then you need an outer join. Let's look at 2 rows of data for each table to explain this.
Friends
ID_number 1 Name Amy
ID_number 2 Name Bob
Family
ID_number 1 Name Amy
ID_number 3 Name Chris
If you just have a totally even join, then you only get the one record which is in both tables -- Amy. But if you want to see all three records, you are essentially accounting for blanks. Because in an even join, the records for Bob and Chris only exist on one side, if you will.
Now - I honestly do not recall how to show proper notation, so please look it up, okay?
But you want your report to return:
ID_number 1 Name Amy
ID_number 2 Name Bob
ID_number 3 Name Chris
This means you need an outer join from the Friends to the Family table to account for ID_number 2 (Bob), because he's only on the Friends side. And you
also need an outer join from the Family to the Friends table to pick up ID_number 3 (Chris).
I hope this makes sense. It's been years since I used SQL. But joins are really key. Once you understand joins, that accounts for a big chunk of what you need to understand.