运行环境
数据库:ora9i .2.0.4.0 axi
操作系统 : unix
客户端 :win2000
开发工具 :delphi 
数据库引擎 :ado 2.8
出错状况
在执行 sql语句时(select count(*)  from  b where  a='2')出现 ora-00937 ;not a single-group gropu function ; 错误
请问者因该是什么问题 各位大侠

解决方案 »

  1.   

    select count(a)  from  b where  a='2'
      

  2.   

    只要在查询中有group by 语句 并且有1个where 条件 肯定出错其它没有where条件的查询或者没有group by 和 count(*)不会出错
    'select count(a)  from  b where  a='2'' 语句也会报错
      

  3.   

    select count(a) as a1  from b group by a having a='2'
    就可以了
      

  4.   

    group by 语句和where 语句是不能放在一块用的,group by 和 having 一块用。select count(*) from b group by a having a='2'
      

  5.   

    SQL server 中没有错啊,ora9i这个知道啊,没有用过
      

  6.   

    group by 语句和where 语句是不能放在一块用的,group by 和 having 一块用。
    ??????????????????????????????