这条查询怎么实现?select count(a)  as countA, a from table where c='me'>>>>>>>>>>>>>
我的意思是,把表table里的字段(a)的值找出来,并统计有多少条,怎么办?

解决方案 »

  1.   

    字段a的条数不就是你打开的这个记录集的条数吗.strSql=select a from table where c='me'set rs=cn.execute(strSql)rs.recordcount就是字段a的条数,也就是该记录集的条数.
      

  2.   

    楼上说的很对,楼主你那条sql语句根本就没有办法执行
      

  3.   

    select count(a)  as countA, a from table where c='me'
    group by a
      

  4.   

    select count(a)  as countA, a from table where c='me'???
    ??
    这样写是不对地,你要么。select cout(colum) from table
    rs.getint(1)要么就strSql=select a from table where c='me'set rs=cn.execute(strSql)rs.recordcount