--查询条件为 表a的字段 在 表b字段 的集合
select * from 表a where a字段 in (select 字段 from 表b where a.字段=b.字段)
--相当于下面这条SQL语句
select a.* from A as a left join B on a.字段 =B.字段
--查询条件为 表a的字段 在 表b字段 的集合
select * from 表a where (select 字段 from 表b where a.字段=b.字段) <>''
--相当于下面这条SQL语句
select a.* from A as a left join B on a.字段 =B.字段 where B.字段 <>''