Can anyone suggest a better way to write this query? I only want to find email addresses in table "a" if they are not in table "b".
SELECT a.email FROM a, b WHERE a.email != b.email LIMIT 0 , 30
Cheers in advance.
CptnChainsaw
Posted 05 December 2012 - 04:34 AM
SELECT a.email FROM a, b WHERE a.email != b.email LIMIT 0 , 30
Posted 05 December 2012 - 04:58 AM
SELECT a.email FROM a LEFT JOIN b ON b.email=a.email WHERE b.email IS NULL
Posted 05 December 2012 - 05:18 AM
Posted 06 December 2012 - 07:03 AM
SELECT a.email FROM a LEFT JOIN b ON b.email=a.email LEFT JOIN c ON c.email=a.email WHERE b.email IS NULL AND c.email IS NULL
Posted 06 December 2012 - 07:33 AM
AND with an OR.
0 members, 0 guests, 0 anonymous users