View Single Post
Old 11-12-2007, 05:30 PM   #3 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

I thought I'd just extend onto that and give you an example of a few joins. There are:
  • LEFT JOIN - Used to include data from the left table, but optional on the right table.
  • RIGHT JOIN - Same as above just other way round.
  • INNER JOIN - Used to include data that is present in both tables - so like an ID matching up to a foreign ID in the other table.
  • NATURAL JOIN - Used to match up a pair of items from the 2 tables that have the same field name. ID to ID, for instance.

There are others like OUTER JOIN which I'm sure others will elaborate on, but the top 4 are what I use most :)
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote