select count(*) from table where STATUS==0

解决方案 »

  1.   

    select count(*) from table where STATUS==0
    union all
    select count(*) from table where STATUS!=0
      

  2.   

    修正:STATUS  BOOLEAN  -->BOOLCREATE OR REPLACE TABLE
    (
    RECORDID    INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
             STATUS      BOOL DEFAULT 0
    );
      

  3.   

    set @isZero;
    set @isnotZero;
    select @isZero:=count(*) from table where STATUS=0;
    select @isnotZero:=count(*) from table where STATUS<>0;
    select @isZero,@isnotZero;
      

  4.   

    set @isZero;
    set @isnotZero;
    select @isZero:=count(*) from table where STATUS=0;
    select @isnotZero:=count(*) from table where STATUS<>0;
    select @isZero,@isnotZero;同意!