I often see people who write SQL like this:
SELECT * from TableA LEFT OUTER JOIN TableB ON (ID1=I2)
I myself write simply:
SELE
OUTER
really is superfluous, as you write, since all OUTER
joins are either LEFT
or RIGHT
, and reciprocally all LEFT
or RIGHT
joins are OUTER
. So syntactically it's mostly noise, as you put it. It is optional even in ISO SQL. As for why people use it, I suppose some feel the need the insist on the join being OUTER
, even if the left-or-right keyword already says so. For that matter, INNER
also is superfluous!
One thing that several months on Stackoverflow has shown me is how much SQL is written and / or maintained by people with no previous exposure to SQL or relational databases at all.
For that reason, I think that the more explicit you can be the better off the next programmer is going to be when looking at your code.