2017-10-10 26 views

回答

3

添加OR Table1.Name IS NULL检查

select * 
from Table1 
where Table1.Name <> 'John' 
     OR Table1.Name IS NULL 
1
select * from Table1 where Table1.Name is null or Table1.Name <> 'John' 
2

这是因为空值每操作返回错误结果。尝试

where IsNull(Table1.Name, '') <> 'John'