日期:2014-05-18  浏览次数:20547 次

两个表和并问题
A,B两个表结构一样,怎样查出两个表里的所有数据
select   *   from   a,b
这样写会有很多多余的数据出来

------解决方案--------------------
select * from A
union all
select * from B
------解决方案--------------------
不去掉重复数据
select * from A
union all
select * from B

去掉重复数据
select * from A
union
select * from B