34,576
社区成员
发帖
与我相关
我的任务
分享
select a.spbh ,a.spmch,a.shengccj,
c.kcshl as shl ,a.dw,
b.yanghulb as yanghffcsh
from spkfk a,stib..zhongy b,spkfjc c
where a.spid=b.spid and a.spid=c.spid and c.kcshl>0
and b.yanghulb <> '10天养护' and b.yanghulb <>'5天养护'
select a.spbh ,a.spmch,a.shengccj,
c.kcshl as shl ,a.dw,
b.yanghulb as yanghffcsh
from spkfk a,stib..zhongy b,spkfjc c
where a.spid=b.spid and a.spid=c.spid and c.kcshl>0
and (b.yanghulb is null or (b.yanghulb <> '10天养护' and b.yanghulb <>'5天养护'))
NULL不等于任何值
当使用比较运算符时,NULL值已被排除
可以这样变通
isnull(b.yanghulb,'') <> '10天养护'