You need to use 2 LEFT JOINS:
SELECT a.*
FROM tablea a
LEFT JOIN table b
ON a.id = b.a_id
LEFT JOIN table c
ON a.id = c.a_id
WHERE b.id is null
AND c.id is null
and check for both joined tables to return null values.
Yours,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Jeff Gannaway
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
hics.com> cc:
Fax to:
07/10/2004 06:00 Subject: Which records are not
contained in 2 different tables?
PM
I've got one huge table (table a), and two smaller tables (tables b and c)
I need to find which records in 'table a' are not in 'table b' nor are they
in 'table c'.
The Primary Key for all 3 tables is 'ProductID'.
I looked at the LEFT JOIN command in the docs, but it looks like you can
only compare 1 table to 1 table.
How do I do this?
-Jeff Gannaway
_______________________________________________
http://RadioU.com
This Is Where Music Is Going - Listen Online!
_______________________________________________
--
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]