select t1.ID,t1.A,t1.B,t1.C,t2.E,t2.F from table t1 left join table t2 on t1.id = t2.id
union ALL
select t2.ID,t1.A,t1.B,t1.C,t2.E,t2.F from table t1 right join table t2 on t1.id = t2.id where t1.id is null
好了,兄弟试试
union all
select * from A
union all
select * from B
列长度不一样啊
@愤怒的小黑:
Select Col1, Col2, Col3, Col4, Col5 from Table1
Union
Select Col1, Col2, Col3, Null as Col4, Null as Col5 from Table2
一个full join不就完了么?