select a.FIELD_A from TABLE_A a
join TABLE_B b on a.FIELD_C = b.FIELD_C
where b.FIELD_D in ('0','1')
GROUP BY a.FIELD_A HAVING COUNT(*) = 2
in 多少个值 COUNT(*) 就等于几
select a.FIELD_A from TABLE_A a
join TABLE_B b on a.FIELD_C = b.FIELD_C
where b.FIELD_D in ('0','1')
GROUP BY a.FIELD_A HAVING COUNT(*) = 2
in 多少个值 COUNT(*) 就等于几