[thelist] SQL
Edward McCarroll
Ed at ComSimplicity.com
Sun Mar 29 10:49:13 CDT 2009
> Seriously, that's the same? I never really can remember anything but
> LEFT join. :(
Sounds sinister to me. ;-)
Kidding aside, here's the difference:
SELECT <columns> FROM <table a> LEFT JOIN <table b> ON <join clause>
The above selects all the records in <table a>, whether or not there's
a matching record in <table b>. When there is no match, columns that
would have come from <table b> are NULL.
The same query with an INNER JOIN selects only the records in <table a>
that have a matching record in <table b>.
(I hope I'm not just telling you what you already know.)
"Some people really do prefer to curse the darkness." (Ed McCarroll)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ed McCarroll Ed at ComSimplicity.com
PO Box 654 (310) 904-3651
Culver City, CA 90232 www.ComSimplicity.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
More information about the thelist
mailing list