Oracle Natural Joins and Count(1)

前端 未结 4 403
长发绾君心
长发绾君心 2021-01-14 01:55

Does anyone know why in Oracle 11g when you do a Count(1) with more than one natural join it does a cartesian join and throws the count way off?

Such as

<         


        
4条回答
  •  甜味超标
    2021-01-14 02:26

    My advice would be to NOT use NATURAL JOIN. Explicitly define your join conditions to avoid confusion and "hidden bugs". Here is the official NATURAL JOIN Oracle documentation and more discussion about this subject.

提交回复
热议问题