2015-11-02 63 views
0

我需要插入10柱(5雙)進入另一個列2 table.i嘗試許多方法,如:插入到單個表從多個選擇

insert into table1(a,b) (select a1,b1 from table2),(select a2,b2 from table2) 

所有的a,b列是從相同的數據類型

回答

3

,如果你想避免重複,您可以使用UNION ALLUNION

insert into table1(a,b) 
select a1,b1 from table2 
UNION ALL 
select a2,b2 from table2; 

LiveDemo