What are the types of JOINs in MySQL?

TypeReturns
INNER JOINRows that match in both tables
LEFT JOINAll rows from the left table, plus matches from the right
RIGHT JOINAll rows from the right table, plus matches from the left
CROSS JOINEvery row of the first table with every row of the second
Self joinA table joined with itself, using aliases (for example employees and their managers)

MySQL has no FULL OUTER JOIN. You can create it with LEFT JOIN ... UNION ... RIGHT JOIN. See MySQL JOINs.


Learn more about the similar topics:
Tutorials
MySQL JOINs
MySQL Subqueries
MySQL UNION
Exercises & Assignments
Write a query to show the student name who has the second highest marks
Write a query to show the names of students with their course names
Write a query to count the students of each course, including empty courses
Write a query to find the students who scored above the average marks
Interview Questions & Answers
What is the difference between INNER JOIN and LEFT JOIN?
What is the difference between UNION and UNION ALL?
What are the types of JOINs in MySQL?
How to find the second highest marks in MySQL?
What is a subquery in MySQL?