开发者

SQL WHERE statement?

开发者 https://www.devze.com 2023-01-18 13:58 出处:网络
What should my WHERE clause be in a SQL开发者_运维百科 Statement in which I want to return those rows where column A is null or column B is null, but not where both are null?WHERE (ColA is NULL AND Co

What should my WHERE clause be in a SQL开发者_运维百科 Statement in which I want to return those rows where column A is null or column B is null, but not where both are null?


WHERE (ColA is NULL AND ColB is NOT NULL)
OR (ColB is NULL AND ColA is NOT NULL)


(A IS NULL OR B IS NULL) AND NOT (A IS NULL AND B IS NULL)
0

精彩评论

暂无评论...
验证码 换一张
取 消