如果表存在,则查询结果插入到表中:
insert into table_1 select * from table_2;
如果表不存在,则插入到新表中
create table_1 select * from table_2;
如果新表要增加自增id,再输入以下命令:
alter table table_1 add id int not null auto_increment primary key;
如果表存在,则查询结果插入到表中:
insert into table_1 select * from table_2;
如果表不存在,则插入到新表中
create table_1 select * from table_2;
如果新表要增加自增id,再输入以下命令:
alter table table_1 add id int not null auto_increment primary key;