1、创建一个表1和表2一致(表结构和索引都一样)
create table table1 like table2;
2、创建一个表1 只复制表2表结构
create table table1 as select * from table2 limit 0;
3、复制表2数据到表1
insert into table1 select * from table2
1、创建一个表1和表2一致(表结构和索引都一样)
create table table1 like table2;
2、创建一个表1 只复制表2表结构
create table table1 as select * from table2 limit 0;
3、复制表2数据到表1
insert into table1 select * from table2