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 ";

posted @ 2015-07-18 14:23  大龙软件工作室  阅读(1444)  评论(0编辑  收藏  举报