> Thanks but I still do not get why this does not merit a, "you might want to
> think about this".
> So in the following query:
> select * from new_payments where closed<>1;
> it is desired that null=1. DeMorgan's law takes a vacation here.
> Correct behavior, in that it is a feature, I expected that; desired - no
> comment. Probably not expected in that selecting for closed=1 and closed<>1
> not yield symmetric results. It was the [not] expected nature that lead me to
> suggest perhaps an example might be helpful.
Please don't top-post. If you want symmetric results from closed=1 and
closed<>1 then you should declare the column as NOT NULL (or not make
use of NULL values, but the former is preferable).
Either that, or reformulate your query to specify what you really mean:
SELECT * FROM new_payments WHERE closed<>1 OR closed IS NULL;
Freelance web developer