Re: Yet another null question

2005-09-20 Thread doug
First - thank you. I want to again thank this list, which in general is the most tolerant to people new to database use and theory in general, and me in particular. I mostly got your point from an earlier answer. Hopeful your example quashes my ignorance, relative to NULL at least. I think I under

Re: Yet another null question

2005-09-20 Thread Joerg Bruehe
Hi! Just some explicit addition: [EMAIL PROTECTED] wrote: [[...]] 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. You use two-valued logic here, where statements are either "true" or "false". (DeMorg

Re: Yet another null question

2005-09-19 Thread doug
Thanks Martijn - that is a clear explanation of the philosophy. I did not get it from the examples and the manual. Doug On Mon, 19 Sep 2005, Martijn Tonies wrote: > Hello Doug, > > > > My question question from MySQL 4.0.22: is it okay that a null interger > > tests as > > equal to any value. I

Re: Yet another null question

2005-09-19 Thread Martijn Tonies
Hello Doug, > My question question from MySQL 4.0.22: is it okay that a null interger tests as > equal to any value. I am not sure the table structure matters but in case it is > I included it. > > I did not expect that null was not not-equal to 1. Cursory testing seems to > indicate that a null

Re: Yet another null question

2005-09-18 Thread doug
Belay my comments on true and false. I got mixed up. That works as documented. On Mon, 19 Sep 2005, Roger Baklund wrote: > [EMAIL PROTECTED] wrote: > > I did not expect that null was not not-equal to 1. > > Any comparison with NULL returns NULL: > > mysql> select null<>1,null>1,null<1,null=1; > +

Re: Yet another null question

2005-09-18 Thread Jasper Bryant-Greene
[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 fe

Re: Yet another null question

2005-09-18 Thread doug
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; des

Re: Yet another null question

2005-09-18 Thread Roger Baklund
[EMAIL PROTECTED] wrote: I did not expect that null was not not-equal to 1. Any comparison with NULL returns NULL: mysql> select null<>1,null>1,null<1,null=1; +-++++ | null<>1 | null>1 | null<1 | null=1 | +-++++ |NULL | NULL

Yet another null question

2005-09-18 Thread doug
My question question from MySQL 4.0.22: is it okay that a null interger tests as equal to any value. I am not sure the table structure matters but in case it is I included it. I did not expect that null was not not-equal to 1. Cursory testing seems to indicate that a null integer field is not not-