• support@answerspoint.com

What's the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN? [duplicate]


What's the difference between INNER JOINLEFT JOINRIGHT JOIN and FULL JOIN in MySQL?



Reading this original article on The Code Project will help you a lot: Visual Representation of SQL Joins.

alt text

Also check this post: SQL SERVER – Better Performance – LEFT JOIN or NOT IN?.

Find original one at: Difference between JOIN and OUTER JOIN in MySQL.

  • answered 7 years ago
  • Gul Hafiz


INNER JOIN gets all records from one table that have some related entry in a second table

LEFT JOIN gets all records from the LEFT linked table but if you have selected some columns from the RIGHT table, if there is no related records, these columns will contain NULL

RIGHT JOIN is like the above but gets all records in the RIGHT table

FULL JOIN gets all records from both tables and puts NULL in the columns where related records do not exist in the opposite table

  • answered 7 years ago
  • G John

Your Answer

    Facebook Share        
  • asked 7 years ago
  • viewed 1923 times
  • active 7 years ago

Best Rated Questions