LEFT OUTER JOIN with WHERE
- produce the set of records only available in tableA, by excluding the records we don't want from the right side using a WHERE clause — get only the table records present in tableA and not tableB
SELECT *
FROM table1
LEFT OUTER JOIN table2
ON table1.name = table2.name
WHERE table2.id IS null
(where id is null, meaning where there is no match in table2)