12-15-2007, 06:11 PM
|
#4 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Just remember to join on indexes. Don't join on non-indexes as it will become painfully slow.
LEFT JOIN basically says if the data is in table 1, but might not be in table 2 - if it's not in table 2, add a null and still pull table 1's data.
RIGHT JOIN is the reverse of the aforementioned.
INNER JOIN is when you only want to pull data from table 1 and table 2 when there's a valid JOIN on an index.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|