SQL两个表连接查询去掉重复数据的方法:在where条件中用not in筛选掉从另一个表中查出的重复的数据
select * from ZHBG_HYSGL_XXGL_SUB
where LHMC not in (select b.LHMC from ZHBG_HYSGL_XXGL_QXYD b where b.QXRQ='2017-03-23' and b.HYSXXGLID='fe3971dc1e564904b8f673e640a9a278' )
and LHRQ like'%星期一%'
and HYSXXGLID='fe3971dc1e564904b8f673e640a9a278'