Reputation: 1777
I have table a joining table b, I only want the records from table a that do not exist in table b.
My partial query is:
SELECT DISTINCT u.id, u.lastname
FROM user u
LEFT JOIN context ct
ON ct.userid = u.id
thank you.
Upvotes: 0
Views: 146
Reputation: 171411
select distinct u.id,
u.lastname
from user u
left join context ct on ct.userid = u.id
where ct.userid is null
Upvotes: 3