【发布时间】:2015-08-19 14:53:33
【问题描述】:
我有以下正常工作的查询:
select * from myTable a where a.company is null and exists (select b.company from myTable b where b.id = a.id and b.office_id = a.office_id and b.company is not null);
现在,我还想在 myTable a 的字段旁边显示子查询中的字段值 b.company。
我该如何完成这项工作?
谢谢你和最好的问候
【问题讨论】:
-
使用外连接代替存在检查