我指定了if(@activeNum=null)set @activeNum=0; ,为什么最后@activeNum是空值?
declare   @activeNum   int; 
 declare   @netbarNum   int;                  
 if   @withlevel= '主管 '   
                      begin   
                      select   @activeNum=sum(A.activeNums)   ,@netbarNum=sum(A.netbarNums)      
                      from   SpreaderDteDinfo   A   inner   join   SpreaderContact   C   on   A.userID=C.userid      
                      where         A.weekid=@weekid   and   C.upuserid=@SpreadID          
                      if(@activeNum=null)   
                      begin   
 set   @activeNum=0;这里我指定了0,但是最后update的值还是空的,为什么?   
                      end          
 if(@netbarNum=null)   
 begin   
 set   @netbarNum=0;   
                      end   
 print   @activeNum    
 message里面什么都没有,为什么?判断空条件错了码?     
------解决方案----------------------if(@activeNum=null)   
 if (@activeNum is null)