select a.cbbh,nvl(min(ztbz),'0')
from a,b
where a.yhh =b.yhh(+) and a.cbbh=b.cbbh(+)
group by a.cbbh;右连接select a.cbbh,nvl(min(ztbz),'0')
from a,b
where a.yhh (+)=b.yhh and a.cbbh(+)=b.cbbh
group by a.cbbh;
左连接
from a,b
where a.yhh =b.yhh(+) and a.cbbh=b.cbbh(+)
group by a.cbbh;右连接select a.cbbh,nvl(min(ztbz),'0')
from a,b
where a.yhh (+)=b.yhh and a.cbbh(+)=b.cbbh
group by a.cbbh;
左连接
说的通俗一点就是,a.yhh=b.yhh 时即使b.yhh不存在与a.yhh相对应的值,该条件也成立.