select uid,names,addtime from tb1 where ...
union --all  去掉all可以去重复
select uid,names,addtime from tb2 where ...

解决方案 »

  1.   


    一个是name,一个是title 两个字段不一样的
    生成的新表怎么赋值
      

  2.   


    /**
    这个语句里字段的别名都是取第一个查询的字段名或其别名作为查询结果集的字段名的
    */select uid,names,addtime from tb1 where ... 
    union --all  去掉all可以去重复 
    select uid,names,addtime from tb2 where .../*上边查询结果集的字段名是uid,names,addtime*/select uid,names,addtime from tb1 where ... 
    union --all  去掉all可以去重复 
    select uid,titles,addtime from tb2 where .../*上边查询结果集的字段名是uid,names,addtime*/select uid,titles,addtime from tb1 where ... 
    union --all  去掉all可以去重复 
    select uid,names,addtime from tb2 where .../*上边查询结果集的字段名是uid,titles,addtime*/
      

  3.   

    select axx as id, att as name from tb1
    union
    select bxx as id, btt as name from tb2