I often see people who write SQL like this:
SELECT * from TableA LEFT OUTER JOIN TableB ON (ID1=I2)
I myself write simply:
SELECT * from TableA LEFT JOIN TableB ON (ID1=I2)
To me the "OUTER" keyword is like line noise - it adds no additional information, just clutters the SQL. It's even optional in most RDBMS that I know. So... why do people still write it? Is it a habit? Portability? (Are your SQL's really portable anyway?) Something else that I'm not aware of?
No. I use
There is no ambiguity for me.
OUTER
really is superfluous, as you write, since allOUTER
joins are eitherLEFT
orRIGHT
, and reciprocally allLEFT
orRIGHT
joins areOUTER
. 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 beingOUTER
, even if the left-or-right keyword already says so. For that matter,INNER
also is superfluous!