select * from a where eixsts(select 1 from b where contact=a.contact)
;with f as ( select * from a where exists(select 1 from b where contact=a.contact) ) select * from f where exists(select 1 from c where contact=c.contact)
select * from a,b,c where a.contact=b.contact and b.contact=c.contact
select contact from a union all select contact from b union all ........這樣?
select * from a where exists (select 1 from b where a.contact = contact) and exists (select 1 from c where a.contact = contact)
(
select * from a where exists(select 1 from b where contact=a.contact)
)
select * from f where exists(select 1 from c where contact=c.contact)
union all
select contact from b
union all
........這樣?
select *
from a
where exists (select 1 from b where a.contact = contact)
and exists (select 1 from c where a.contact = contact)
select * from a where contact='***'
union all
select * from c where contact='***'
union all
select * from b where contact='***'