Sql Join and Different Types of Joins
What Is a Sql Join and What Are Different Types? 0 6 Answers an Illustration from W3Schools: 16 What Is Sql Join? Sql Join Is a Method to Retrieve Data from...
What is a SQL JOIN and what are different types?
6 Answers
What is SQL JOIN ?
SQL JOIN is a method to retrieve data from two or more database tables.
What are the different SQL JOINs ?
There are a total of five JOINs. They are :
1. JOIN or INNER JOIN
2. OUTER JOIN
2.1 LEFT OUTER JOIN or LEFT JOIN
2.2 RIGHT OUTER JOIN or RIGHT JOIN
2.3 FULL OUTER JOIN or FULL JOIN
3. NATURAL JOIN
4. CROSS JOIN
5. SELF JOIN
1. JOIN or INNER JOIN :
In this kind of a JOIN, we get all records that match the condition in both tables, and records in both tables that do not match are not reported.
In other words, INNER JOIN is based on the single fact that: ONLY the matching entries in BOTH the tables SHOULD be listed.
Note that a JOIN without any other JOIN keywords (like INNER, OUTER, LEFT, etc) is an INNER JOIN. In other words, JOIN is
a Syntactic sugar for INNER JOIN (see: Difference between JOIN and INNER JOIN).