--两个表各自的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

解决方案 »

  1.   

    --两个表合计的count>100的情况:create view 视图名
    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
      

  2.   

    --第一个要调整一下:
    --两个表各自的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
      

  3.   

    第一个就可以给分了,楼主是怎么回事,能用就好了,要么还有什么条件,要么就是忘记了,:)
    就你说的这个条件,用union就可以解决了:)