本帖最后由 cn_a380 于 2010-05-06 10:29:45 编辑

解决方案 »

  1.   


    select count(*) from cup where outfee=0 or infee=0;
      

  2.   

    select a.rs ,b,rs from (select count(*) rs from cup where infee=0)a,
    (select count(*) rs from cup where outfee=0)b
    貌似可以,楼主试下
      

  3.   


    select count(*) from cup where infee=0;
    union all
    select count(*) from cup where outfee=0;
      

  4.   

    select count(*) from cup where infee=0;
    union all
    select count(*) from cup where outfee=0;
    高!
      

  5.   


    select 
    sum(case when infee=0 then 1 else 0 end),
    sum(case when outfee=0 then 1 else 0 end)
    from cup;