=== Compliant solution [source,text] ---- SELECT * FROM my_table WHERE NOT EXISTS (SELECT 1 FROM another_table WHERE nullable_column = my_table.my_column) ---- [source,text] ---- SELECT * FROM my_table WHERE my_column NOT IN (SELECT nullable_column FROM another_table WHERE nullable_column IS NOT NULL) ----