Select a from tabella1
inner join tabella2 on a=b