[thelist] SQL

Fred Jones fredthejonester at gmail.com
Sun Mar 29 13:14:52 CDT 2009

>  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.)

I did know it. I'm not as stupid as I look. But I tend to know it only
in theory and never use it in practice... I always forget that
anything exists except LEFT. :)


More information about the thelist mailing list