select * from tb1 where 条件 = ... union all select * from tb2 where 条件 = ... ... select * from tb12 where 条件 = ...
select * from tb1 where 条件 = ... union all select * from tb2 where 条件 = ... ... select * from tb12 where 条件 = ... select * from ( select * from tb1 union all select * from tb2 ... select * from tb12 ) t where 条件 = ...
select * from ( select * from tb1 union all select * from tb2 ... select * from tb12 ) t where 条件 = ...
select * from ( select * from tb1 union all select * from tb2 ... select * from tb12 ) t group by 字段1,字段2,...,字段1 having count(*)>1
union all
select * from tb2 where 条件 = ...
...
select * from tb12 where 条件 = ...
union all
select * from tb2 where 条件 = ...
...
select * from tb12 where 条件 = ...
select * from
(
select * from tb1
union all
select * from tb2
...
select * from tb12
) t
where 条件 = ...
(
select * from tb1
union all
select * from tb2
...
select * from tb12
) t
where 条件 = ...
(
select * from tb1
union all
select * from tb2
...
select * from tb12
) t
group by 字段1,字段2,...,字段1 having count(*)>1