如何检查 TSQL 中 WHERE 语句中的逻辑比较是 TRUE 还是 FALSE?
我怎样才能完成这个查询,以便我可以检查逻辑比较的结果是否为FALSE:
SELECT *
FROM table1
INNER JOIN table2 ...
INNER JOIN table3 ...
INNER JOIN table4 ...
WHERE ( ( table1.Value IS NULL) AND
( table2.Value IS NULL) AND
( table3.Value IS NULL) AND
( table4.Value IS NULL) ) -- Here I want to ADD something like IS FALE;
--How can I do this?
How can I accomplish this query so that I can check the logical comparison's result is FALSE:
SELECT *
FROM table1
INNER JOIN table2 ...
INNER JOIN table3 ...
INNER JOIN table4 ...
WHERE ( ( table1.Value IS NULL) AND
( table2.Value IS NULL) AND
( table3.Value IS NULL) AND
( table4.Value IS NULL) ) -- Here I want to ADD something like IS FALE;
--How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 NOT 操作数
Use the NOT operand
您有几个选项
NOT
...(Table4.value IS NOT NULL)...
...NOT (Table4.value IS NULL)...
CASE
CASE WHEN (<复杂比较> = somevalue THEN 1 ELSE 0) = 0< /代码>
You have a few options
NOT
...(Table4.value IS NOT NULL)...
...NOT (Table4.value IS NULL)...
CASE
CASE WHEN (<complex comparison> = somevalue THEN 1 ELSE 0) = 0
您的意思是:
Do you mean: