Hi guys,
I'm just abit confuse between those two joins, I need your guys idea if I could :
Here's the example
As you can see the inner join only shows whatever if first table and second table match.
But the left joins only shows whatever exists in first table, don't care whether exist in second table.
So, what's the difference with left outer join then ?
I thought left outer join would do the same as left join for example above.
Can anyone throws more idea please ?
I'm just abit confuse between those two joins, I need your guys idea if I could :
Here's the example
Code:
SELECT Employees.Name, Orders.Product
FROM Employees
INNER JOIN Orders
ON Employees.Employee_ID=Orders.Employee_ID
-- result :
Name Product
Hansen, Ola Printer
Svendson, Stephen Table
Svendson, Stephen Chair
SELECT Employees.Name, Orders.Product
FROM Employees
LEFT JOIN Orders
ON Employees.Employee_ID=Orders.Employee_ID
--result
Name Product
Hansen, Ola Printer
Svendson, Tove
Svendson, Stephen Table
Svendson, Stephen Chair
Pettersen, Kari
As you can see the inner join only shows whatever if first table and second table match.
But the left joins only shows whatever exists in first table, don't care whether exist in second table.
So, what's the difference with left outer join then ?
I thought left outer join would do the same as left join for example above.
Can anyone throws more idea please ?