这样可以?
  select a1.id,nvl(a1.yeji,0),nvl((select a2.mubiao from a2 where a2.id=a1.id),0)   from a1
union
select a2.id,'0',a2.mubiao from a2 where a2.id not in (select a1.id from a1);