I don't understand. You want every other record except .....what?
By flipping the equality the way you did, you should see all of the records
where a.id = b.id (regardless of what the b.type value is) where a.type was
not 'X' which is one reasonably valid solution to the statement "all of the
rows NOT found by the above query"
The more details you give us the better we can help you. If you can give us
your SHOW CREATE TABLE statements and possibly some sample data, we should
be able to get at exactly the data you want to see.
Respectfully,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Bob Lockie
<[EMAIL PROTECTED] To: MySQL Mailing List <[EMAIL
PROTECTED]>
ca> cc:
Fax to:
06/21/2004 04:04 Subject: opposite query
PM
I have:
select name from a, b where a.type='X' and a.id=b.id;
I want a query to return all the rows that were NOT found by the above
query.
I can't simply do:
select name from a, b where a.type!='X' and a.id=b.id;
because there is more than one row in b for each type!='X' but there is
only one row in b for each type='X'
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]