It depends what result you want. You could just join them, but you might be looking for ...

Code:
select ..
from
   (select distinct id from table_a) t1,
   (select distinct id from table_b) t2,
where
   t1.id = t2.id