In: Computer Science
Please use an Access database with two tables to answer the following: use an example to discuss the difference between a right, left, and inner join. Next, perform the left joint, right joint, and inner joint all on the each of the two tables.
INNER JOIN:
Inner Join is nothing but equi-join, it is the most common join, it
is used to get common(matching) data from both the tables.
RIGHT JOIN:
Right join will take all the records from the right table but only
take matching data from the left table.
LEFT JOIN:
Left Join is just the opposite of RIGHT JOIN, take all the records
from the left table but only take matching data from the right
table.
Don't be confused with it, in ACCESS it is the same concept as
other,
It is very simple here we just have to drag and drop and use some
options.
Let me explain with some example:
let say there is 2 Table, I am keeping it very simple. You can see in the below screenshot.
if it is not much visible don't worry, let me explain it, here is 2 tables Customers and Order Items with different attributes in it.
Now If I want to join this 2 tables I will have to select 1-2 column from both the table with is be a relation, lets see that screenshot:
Just like this.
Now if you double-click on that line you will get options.
here 1st option is INNER JOIN, 2nd option is LEFT JOIN and obviously 3rd is RIGHT JOIN.
I hope it is clear.
Thanks