Condition within JOIN or WHERE

后端 未结 9 1692
无人共我
无人共我 2020-11-22 10:16

Is there any difference (performance, best-practice, etc...) between putting a condition in the JOIN clause vs. the WHERE clause?

For example...

-- C         


        
9条回答
  •  太阳男子
    2020-11-22 10:50

    Putting the condition in the join seems "semantically wrong" to me, as that's not what JOINs are "for". But that's very qualitative.

    Additional problem: if you decide to switch from an inner join to, say, a right join, having the condition be inside the JOIN could lead to unexpected results.

提交回复
热议问题