codice:
select tab1.id from tabella1 as tab1
left join tabella2 as tab2
on tab1.id = tab2.id
where tab2.id is null