Should I use the sql JOIN keyword for complex joins on multiple tables?

后端 未结 4 864
日久生厌
日久生厌 2021-02-03 12:42

I\'ve got the following request :

select * 
    from tbA A, tbB B, tbC C, tbD D
where 
    A.ID=B.ID and B.ID2= C.ID2 and A.ID=D.ID and C.ID3=D.ID3 and B.ID4=D.I         


        
4条回答
  •  不要未来只要你来
    2021-02-03 13:15

    JOIN syntax is more legible (though I personally prefer WHERE syntax in simple cases), and, which is more important, can handle INNER and OUTER joins in more clear way.

    WHERE is not deprecated and will probably never be.

    It's deprecated only in a sense that different OUTER JOIN workarounds (like (*) and (+)) are deprecated.

    There is nothing you cannot do with JOIN that you can do with WHERE, but not vise versa.

提交回复
热议问题