Different Types of SQL JOINs
Here are the different types of the JOINs in SQL:
(INNER) JOIN: Returns records that have matching values in both tables
LEFT (OUTER) JOIN: Return all records from the left table, and the matched records from the right table
RIGHT (OUTER) JOIN: Return all records from the right table, and the matched records from the left table
FULL (OUTER) JOIN: Return all records when there is a match in either left or right table
SELECT [ ALL | DISTINCT | DISTINCTROW ] expressions FROM table1, table2 ,table3 ... 1. WHERE table1.primary_key = table2.foreign_key 2. WHERE table1.primary_key = table2.foreign_key