Oracle Natural Joins and Count(1)

前端 未结 4 372
长发绾君心
长发绾君心 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:27

    you should try a count(*)

    There is a difference between the two.
    count(1) signifies count rows where 1 is not null
    count(*) signifies count the rows

提交回复
热议问题