What is the difference between LEFT JOIN
and LEFT OUTER JOIN
?
To answer your question there is no difference between LEFT JOIN and LEFT OUTER JOIN, they are exactly same that said...
INNER JOIN - fetches data if present in both the tables.
OUTER JOIN are of 3 types:
LEFT OUTER JOIN
- fetches data if present in the left table.RIGHT OUTER JOIN
- fetches data if present in the right table.FULL OUTER JOIN
- fetches data if present in either of the two tables.CROSS JOIN, as the name suggests, does [n X m]
that joins everything to everything.
Similar to scenario where we simply lists the tables for joining (in the FROM
clause of the SELECT
statement), using commas to separate them.
Points to be noted:
JOIN
then by default it is a INNER JOIN
.OUTER
join has to be LEFT
| RIGHT
| FULL
you can not simply say OUTER JOIN
.OUTER
keyword and just say LEFT JOIN
or RIGHT JOIN
or FULL JOIN
.For those who want to visualise these in a better way, please go to this link: A Visual Explanation of SQL Joins