Snippet Name: A minus B query Description: Get contents of table where the item does NOT exist in another table. Comment: (none) Language: MYSQL Highlight Mode: MYSQL Last Modified: March 01st, 2009
Description: Get contents of table where the item does NOT exist in another table.
SELECT DISTINCT a.member_id, a.name FROM a LEFT JOIN b USING (member_id, name) WHERE b.member_id IS NULL