sea_1987
sea_1987

Reputation: 2954

MySQL joins? What are they? When to use them?

I am probably going to get slaughtered for this, and told to read the manual (which I have, but it has not helped my understanding).

I working with MySQL more and more at the moment, but I cannot get my head around joins, I know there are multiple types of join, i.e Inner, Outer, Left, Right but I do not what the differences are between them or what the adavantages of using one over the other is.

I find myself more and more just using left joins as I know the syntax, however I am now worried that maybe this good put my applications at a disadvantage in terms of speed and maybe I should be using other joins depending on what my needs are?

Upvotes: 2

Views: 1141

Answers (2)

Frank Heikens
Frank Heikens

Reputation: 127106

I really like this explanation: http://www.codeproject.com/KB/database/Visual_SQL_Joins.aspx It shows all kinds of JOIN's and has a nice overview. Make a hardcopy and glue it on your door.

enter image description here

Upvotes: 4

Haim Evgi
Haim Evgi

Reputation: 125496

I love this post !!!

http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html

its a visual explanation (by diagrams) make it pretty clear.

Upvotes: 3

Related Questions