There are tables A and B related by a one-to-many relationship, respectively.

You must select all records A that do not have records associated with them in B.

    1 answer 1

    JOIN to help you. Probably like this:

    SELECT * FROM TableA FULL OUTER JOIN TableB ON TableA.name = TableB.name WHERE TableA.id IS null OR TableB.id IS null id name id name -- ---- -- ---- 2 Monkey null null 4 Spaghetti null null null null 1 Rutabaga 

    null null 3 Darth Vader

    • one
      Isn't it easier? :) SELECT * FROM A where id_from_a not in (select id_from_a from B) - sonniy