select a.*
from yjr_t_mz_report_mon_save a
left join branch b
on branch_type = '002'
and a.ksmc = b.branch_name
where a.REPORT_MON = '201310'
and b.order_num is not null
order by b.order_num
查询结果没有返回a表的所以值!!! 应该是37条记录,结果查出36条记录
我测试 select a.* from yjr_t_mz_report_mon_save a where a.REPORT_MON = '201310'
有37条记录
select b.* from branch b where order_num is not null 有36条记录