mysql full join问题请问如何在mysql下实现full join貌似只有left join right join想实现效果:tab1
id name
1 tt1
2 tt2
4 tt4tab2
id name
3 tt3
5 tt5
6 tt6id name
1 tt1
2 tt2
3 tt3
4 tt4
5 tt5
6 tt6 

解决方案 »

  1.   

    上面写的有误------------想实现效果:tab1
    id name
    1 tt1
    2 tt2
    4 tt4tab2
    id name
    3 tt3
    5 tt5
    6 tt6最终效果:
    id name name2
    1 tt1
    2 tt2
    3       tt3
    4 tt4
    5       tt5
    6       tt6
      

  2.   

    select * from (select * from tab1 union all select * from tab2 )T order by id asc;
      

  3.   

    本帖最后由 yueliangdao0608 于 2007-10-22 11:22:10 编辑