- 复制表结构和数据
create table table_name_new as select * from table_name_old;
- 复制表结构
create table table_name_new as select * from table_name_old where 1=2;
- 复制表数据(全量插入数据)
- 两个表结构相同
insert into table_name_new select * from table_name_old;
- 两个表结构不相同(列名称一一对应复制)
insert into table_name_new (column1,column2...) select column1,column2... from table_name_old;
- 两个表结构相同