怎样统计某个系学生的人数

解决方案 »

  1.   

    --沒有數據制能猜
    select count(*) from tb where 系='計算機'
      

  2.   

    你的表结构是啥样的?
    --try
    select count(1) from tb where 系名=“你要统计的系名”
      

  3.   

    select count(*) as '系人数' from tb where 系名='指定的系名'
      

  4.   


    select count(1) as '系人数' from tb where 系名='指定的系名'
      

  5.   

    select count(1) as '系人数',系名 from tb group by 系名 where 系名='指定的系名'
      

  6.   

    select count(*) as '系人数' from tb where 系名='指定的系名'
      

  7.   

    需要看看表结构
    select count(*) as '系人数' from tb where 系名='指定的系名'或许可以