At 03:27 PM 3/16/2007, you wrote:
How to find all the values of column a in table A that are not values of column b in table B?
Thanks

YL,
You need to do a Left Join and it will use NULL's for rows in the second table if the row is missing.

select A.* from TableA TA left join TableB TB on TA.id=TB.Id where TB.Id is null

http://dev.mysql.com/doc/refman/5.1/en/join.html
http://dev.mysql.com/doc/refman/5.1/en/left-join-optimization.html

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

Reply via email to