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?
+6
A:
WHERE (ColA is NULL AND ColB is NOT NULL)
OR (ColB is NULL AND ColA is NOT NULL)
Developer Art
2010-10-01 10:07:01
+3
A:
(A IS NULL OR B IS NULL) AND NOT (A IS NULL AND B IS NULL)
Boris Kolpackov
2010-10-01 10:09:01