I have two tables that I want to use a join to exclude data if it exists in the other table. I basically want a list of people from table B that dont exist in table A
If A.account_id exists as B.account_id then dont want it to return in the result set. I have done it as an inclusive query using an INNER JOIN. What I need however is for it to exclude them not include them.
My thoughts are to do a LEFT JOIN and then use PHP to exclude the result sets that have a B.account_id value. This seems awfully expensive if a query can return only the required accounts instead. (there could be thousands!)
A push in the right direction would be greatly appreciated