Roger Baklund wrote:

<snip>
This is (as I see it) a documentation issue, I was not trying to say that Vlad was "wrong".

Right, that's why I'm copying the docs list.


While we're at it: the term "non-zero"... what does it mean? As we all know, NULL != 0, and 0 == zero, consequently NULL must be non-zero.

I would like to have a comment on this as well... or rather: I wonder if anyone agrees with me that "non-zero" is a bad term to use in this context (MySQL documentation, description of logical operator OR), or if I am just overthinking again... :)

Well, if we imagined a NONZERO function, I think we would agree that NONZERO(1) is 1, NONZERO(0) is 0, and NONZERO(NULL) is NULL
(for the usual reasons).


Of course, that doesn't mean that "non-zero" alone is the best way to describe this in the docs. Perhaps something like this would be better:

OR
||
Logical OR. Returns 1 if either operand evaluates to a non-zero integer, else it returns NULL if either operand is NULL, otherwise 0 is returned.


or perhaps

OR
||
Logical OR. If either operand evaluates to a non-zero integer, returns 1; else if either operand is NULL, returns NULL; otherwise 0 is returned.


Michael

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



Reply via email to