Your point does not seem relevant to my question on mySQL compliance with the specification. In fact, your response doesn't even mention the specification.
Perhaps I'm misunderstanding your question. You are wondering why I would ask a query like SELECT * FROM Person WHERE NOT name = 'Bob'? Might I ask such a query to get the list of all people who are not named Bob? Also, my question involves mySQL's conformance to the SQL specification. Your demonstration of what mySQL does with "SELECT not name..." seems irrelevant if it's mySQL's compliance that is in question. > I'm not sure why you would use the syntax you are > trying to use. I > think you are making a few assumptions that may be > incorrect. If you do > this query: > SELECT not name='Bob' FROM person > You'll see your result is set contains all 0's. > Records where > name='Bob' would return 1, but you are taking the > opposite of 1, which > would be 0. For those records that return 0, you > want the opposite of > 0, which is????? Infinity? If you convert infinity > to boolean, it would > be false. So from my point of view, MySQL is using > the correct > precedence. > > If you want to find all records that are not Bob, > why not just us this > syntax: > SELECT * FROM person WHERE name!='Bob' > > It's more efficient since there is only one > comparison occurring > instead of two, negating name='Bob'. After all, you > are looking to > negate the equal, not negate name. > > On Friday, October 3, 2003, at 07:42 AM, Ed Smith > wrote: > > > In mySQL 4.1-alpha, 4.0.15a, and 3.23.58, I get > the > > following results: > > > > mysql> SELECT * FROM person WHERE NOT name = > 'Bob'; > > Empty set (0.00 sec) > > > > mysql> SELECT * FROM person WHERE NOT (name = > 'Bob') > > +------+ > > | name | > > +------+ > > | Jane | > > +------+ > > 1 row in set (0.00 sec) > > > -- > Brent Baisley > Systems Architect > Landover Associates, Inc. > Search & Advisory Services for Advanced Technology > Environments > p: 212.759.6400/800.759.0577 > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]