SQL 中判断列中的值是否为null,为null时候用0来代替

  string strsql = "select itemno,cname,ename,shortname,IntervalInvalid,IntervalCheck,IntervalInceptReceive,IntervalCheckSend,isnull(IntervalInvalid,0)+isnull(IntervalCheck,0)+isnull(IntervalCheckSend,0)+isnull(IntervalInceptReceive,0)as couns from testItem  WHERE  1=1 ";

转载于:https://www.cnblogs.com/plug/p/4656836.html

你可能感兴趣的:(SQL 中判断列中的值是否为null,为null时候用0来代替)