Do you use the OUTER keyword when writing left/right JOINs in SQL?

后端 未结 8 2257
臣服心动
臣服心动 2021-02-13 22:25

I often see people who write SQL like this:

SELECT * from TableA LEFT OUTER JOIN TableB ON (ID1=I2)

I myself write simply:

SELE         


        
8条回答
  •  再見小時候
    2021-02-13 23:10

    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!

提交回复
热议问题