select name from ( select distinct name from t1 union all select distinct name from t2 union all select distinct name from t3 union all select distinct name from t4 ) t group by name having coung(1)>1
找出重复的名单select name ,COUNT(*) as num from ( select name from t1 union all select name from t2 union all select name from t3 )t group by name having COUNT(*)>1
from (
select distinct name from t1 union all
select distinct name from t2 union all
select distinct name from t3 union all
select distinct name from t4
) t
group by name
having coung(1)>1
from
(
select name from t1
union all select name from t2
union all select name from t3
)t
group by name
having COUNT(*)>1