1.对的,笛卡儿积
2.语法错,
select a_name,count(*) ”number of employees”
from a,b where ano = a_no
group by a_name
having  count (*) > 5
order by 2 desc;

解决方案 »

  1.   

    学习一下sql基本知识就明白为何1出现12条数据
    像sum,count,avg等函数时不能出现在where语句里
    他们做条件时候用在having里
      

  2.   

    1.笛卡儿积
    2.group by 时,count()要放在having 里.应改成:select a_name,count(*) ”number of employees”
    from a,b where ano = a_no
    group by a_name
    having  count (*) > 5
    order by 2 desc;
      

  3.   

    1、数据库的结果集使用笛卡尔乘积运算
    2、不能把count(*)放在where 后边做为限制条件,因为count(*)不是表a,b中的一个列
      

  4.   

    介绍你个网站
    http://www.oradb.net
      

  5.   

    1、如果没有WHERE条件约束,则结果肯定是12条,笛卡尔乘积运算的结果,既A表的每一条记录对应B表中所有的记录,结果等于记录的乘积。
    2、语法错误
    select a_name,count(*) ”number of employees”
    from a,b where ano = a_no
    group by a_name
    having  count (*) > 5
    order by 2 desc;
     having必须配合group by 使用,看看关于pl/sql方面的书。