SQL JOIN - WHERE clause vs. ON clause

前端 未结 19 1963
深忆病人
深忆病人 2020-11-21 11:56

After reading it, this is not a duplicate of Explicit vs Implicit SQL Joins. The answer may be related (or even the same) but the question is diffe

19条回答
  •  深忆病人
    2020-11-21 12:40

    In terms of the optimizer, it shouldn't make a difference whether you define your join clauses with ON or WHERE.

    However, IMHO, I think it's much clearer to use the ON clause when performing joins. That way you have a specific section of you query that dictates how the join is handled versus intermixed with the rest of the WHERE clauses.

提交回复
热议问题