All In One Script
MENU

What is the difference between “INNER JOIN” and “OUTER JOIN”?

by 4:20:00 AM
undefined
What is the difference between “INNER JOIN” and “OUTER JOIN”? Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in? Answer : Assuming you're joining on columns with no duplicates, which is a very common case: An inner join of A and B gives the result of A intersect B, i.e. the inner part of a Venn diagram intersection. An outer join of A and B gives the results of A union B, i.e. the outer parts of a Venn diagram union. Examples Suppose you have two tables,

Bidirectional outer JOIN

by 3:11:00 AM
undefined
Bidirectional outer JOIN Suppose we have a table A: itemid mark 1 5 2 3 and table B: itemid mark 1 3 3 5 I want to join A*B on A.itemid=B.itemid both right and left ways. i.e. result: itemid A.mark B.mark 1 5 3 2 3 NULL 3 NULL 5 Is there a way to do it in one query in MySQL? Best answer :  It's called a full outer join and it's not supported natively in MySQL, judging from its docs. You can

Instagram