用union关键字就可以,你试一下。
select t1.id,t1.name,t1.sex,t1.state from talbe1 as t1 union select t2.id,t2.name,t2.sex,t2.state from talbe2 as t2。如果想把相同的数据都显示出来将union 换成union all即可
select * from table1 union all select * from table2,union all 是所有的都显示出来,union 是只显示不重复的,如果两个表的字段部分相同,把查询的字段写出来亦可
或许你说的是用下面的语句:
select * from table1 union all select * from table2