Problem Statement
Which pattern correctly returns rows in A that have no match in B?
Explanation
A LEFT JOIN followed by WHERE B.id IS NULL forms an anti-join. It keeps left rows that did not match any right row.
NOT EXISTS is an equivalent and often clearer way to write the same logic.
Code Solution
SolutionRead Only
SELECT a.id FROM A a LEFT JOIN B b ON b.id = a.id WHERE b.id IS NULL;
