--两个表各自的count>100的情况:create view 视图名
as
select id,name,count from A表 where count>100
union all
select id,name,count from B表表 where count>100
as
select id,name,count from A表 where count>100
union all
select id,name,count from B表表 where count>100
as
select id,name,[count]=sum([count]) from(
select id,name,count from A表 where count>100
union all
select id,name,count from B表表 where count>100
) a group by id,name
having sum([count])>100
--两个表各自的count>100的情况:create view 视图名
as
select id,name,[count] from A表 where [count]>100
union all
select id,name,[count] from B表 where [count]>100
就你说的这个条件,用union就可以解决了:)