drop table test1
go
create table test1 ( a int null, b int null , c int null, d int not null)
go
insert into test1 values (null,null,null,4)
insert into test1 values (null,null,null,8)
insert into test1  values (1,2,3,4)
insert into test1  values (1,2,6,4)
go1)select * from test1 where (a +b +c) <d
2)select * from test1 where (a +b +c) =d
3)select * from test1 where (a is null) and (b is null) and (c is null)