Is it possible that LEFT JOIN fails while subquery with NOT IN clause suceeds?
问题 A while I have posted an answer to this question PostgreSQL multiple criteria statement. Task was quite simple - select values from one table if there is no corresponding value in another table. Assuming we have tables like below: CREATE TABLE first (foo numeric); CREATE TABLE second (foo numeric); we would like to get all the values from first.foo which doesn’t occur in the second.foo . I've proposed two solutions: using LEFT JOIN SELECT first.foo FROM first LEFT JOIN second ON first.foo =