/**1. 用select 创建相同表结构的表*/
create table test_tbl2 as select * from test_tbl1 where 1<>1;
/**
2. 用insert into .. select 插入
*/
insert into test_tbl2(id,name,salary) select id,name,salary from test_tbl1 where id<6;
/**1. 用select 创建相同表结构的表*/
create table test_tbl2 as select * from test_tbl1 where 1<>1;
/**
2. 用insert into .. select 插入
*/
insert into test_tbl2(id,name,salary) select id,name,salary from test_tbl1 where id<6;
转载于:https://www.cnblogs.com/jianglong-liang/p/3344179.html