[thelist] SQL question

Carl J Meyer cjmeyer at npcc.net
Tue Dec 10 17:25:01 CST 2002

ok everyone,

I've used SQL for years in DB/web applications, and never have I ever
used any of the JOIN keywords (INNER,OUTER,LEFT,RIGHT,JOIN,etc).  I've
always done what appears to be exactly the same thing, just using the
WHERE clause (ie table1.key=table2.fkey).  And IIRC I've been able to do
the equivalent of left/right join by appending a + to the name of the
column from which I want all rows (that may be DB server specific,
though, I'm not sure).

So my (possibly stupid) question is: why use the JOIN keyword?  What's
the advantage over a simple WHERE clause join?  Is it just a matter of
clearer syntax (for my money, the JOIN syntax isn't clearer)?  Or is
there some performance difference that I don't know about?  Or are there
things you can do with JOIN that you can't do with the WHERE clause?


More information about the thelist mailing list