1.复制表结构和数据
create table table_new as select * feom table_old
2.只复制表结构
create table table_new as select * feom table_old where 1=2; 或者 create table table_new like table_old;
3.只复制表数据
①两个表结构一致 insert into table_new select * from table_old;
②表结构不一致
insert into table_name_new(column1,column2...) select column1,column2... from table_name_old