Thursday, May 12, 2016

PostgreSQL: join opposite

select
t1.*
from table1 t1
left join table2 t2 on t1.id=t2.id
where t2.id is null;