[EMAIL PROTECTED] wrote:
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 does
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;

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to