比如我的sql语句写成:select count(*) from class where classid = '000000'
我该如何取得这个count(*)的值呢?

解决方案 »

  1.   

    刚才的写错了,没有看清楚:
    reccount:=adoquery1.Fields[0].AsInteger;
      

  2.   

    你可权把语句改为select count(*) as p from class where classid='000000'
    然后对p可进行操作
      

  3.   

    直接操作p?怎么个操作法,比如说querytmp.fieldbyname('p').asinteger还是用querytmp.parambyname('p').asinteger?
      

  4.   

    select count(*) as p from class where classid='000000'
      

  5.   

    现在有个新的问题,是classid是9位,然后我想截取前6位,大致的意思是
    select count(*) as p from class where 截取6位(classid)? = 000000
      

  6.   

    select count(*) as rscount from class where classid = '000000'读取的时候,用rs("rscount")
      

  7.   

    如果是access:
    类似
    select count(*) as p from class where left(qno,6)='000000'
      

  8.   

    'select count(*) as count from class where left(classid,6)='+''''+'000000'+''''