I have a select that brings me some primary keys. I need to SELECT all values from other table that are not listed in the previous query. How can I do it?
I have been trying:
SELECT id
FROM tab1,
,(SELECT id...
WHERE LIKE '%abc%'
) AS result
WHERE result != tab1.id;
But didn't work, it brings me also the data from the subquery. I'm using PostgreSQL.