【发布时间】:2017-08-04 08:55:41
【问题描述】:
SELECT a.name,
nvl(c.bill_amount,0),
b.status
FROM table_1 a left outer join table_2 b
ON a.name = b.name and
b.status = 'YES'
left outer join table_3 c on B.phone_number = C.phone_number
AND B.email = C.email
where
a.VALID = 'Y';
我最近写了这个查询,上面的查询中没有满足条件 b.status = 'yes' 并且状态显示为 NULL 值。我想根据这个条件来完善我的记录 b.status ='yes'。
【问题讨论】:
标签: database oracle join left-join where-clause