如果表1和表2的字段都一样,而且顺序一样,那么可以用insert into biao1 select × from biao2. 如果不一样,就需要对应字段。
表的字段个数和类型都要相同也可以创建新表的方式导入 create table t1 as select* deom t2
4楼正解 可以直接create table table1 as select * from table2 insert into table1 select * from table2 要求两个表的结构完全一样 包括创建字段的顺序 为了保险起见 如果字段不是很多 建议把字段列出来 insert into table1(col1,col2)select col1,col2 from table2
表的字段个数和类型都要相同也可以创建新表的方式导入
create table t1 as select* deom t2
可以直接create table table1 as select * from table2
insert into table1 select * from table2 要求两个表的结构完全一样 包括创建字段的顺序
为了保险起见 如果字段不是很多 建议把字段列出来
insert into table1(col1,col2)select col1,col2 from table2