Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on SELECT wat FROM sql. Parent comment
Because, by definition, the WHERE clause returns a record when it evaluates to TRUE. FALSE and UNKNOWN are not TRUE.
Second, you absolutely can do what you're trying to here, but not the way you've done it:
SELECT CASE WHEN bar = baz THEN 'foo' ELSE 'bar' END AS corge FROM quux
There are no comments on this comment yet.
Because, by definition, the WHERE clause returns a record when it evaluates to TRUE. FALSE and UNKNOWN are not TRUE.
Second, you absolutely can do what you're trying to here, but not the way you've done it:
You're asking the wrong question and wondering why you're getting the wrong answer.