如图为什么我想查询a = 111 的数据 居然连 a = 222 也出来了
正确的显示a = 111的数据应该怎么查

解决方案 »

  1.   

    select * from (select * from r1 union all select * from r2) where a=111
      

  2.   

    试一下这样写行不行 
    select * from
    r1 union all r2 where r1.a = 111;
      

  3.   

    少个别名select * from (select * from r1 union all select * from r2) a where a=111