空字符串不叫没有数据,你要清楚什么是t-sql的3值逻辑。不过既然你“觉得”是没有数据,那就改一下: where isnull(Status,'')='' and isnull(DateOfPost,'')='' [其他解释] select * from 表 where rtrim(isnull(字段,''))='' [其他解释] SELECT * FROM 表 WHERE (Status IS NULL OR Status='') AND (DateOfPost IS NULL OR DateOfPost='') [其他解释] 没有数据仅仅是指null而不是空字符串吧? [其他解释] where isnull(Status,'')='' and isnull(DateOfPost,'')='' [其他解释]
where isnull(Status,'')='' and isnull(DateOfPost,'')=''
还是
where isnull(Status,'')='' or isnull(DateOfPost,'')=''
管他是空字符串还是null,先都整成' ' 你自己选一个吧
[其他解释] where Status is null and DateOfPost is null [其他解释]