1.如果表不存在
create table 表1 select * from 表2;
2.如果表存在
①如果兩張表結(jié)構(gòu)一致
insert into 表1 select * from 表2;
②如果兩張表結(jié)構(gòu)不一致
insert into 表1(字段1,字段2,...,字段n) select 字段1,字段2,...,字段n from 表2;
應(yīng)用舉例:
下圖為用戶表數(shù)據(jù)。

1.將用戶表的數(shù)據(jù)復(fù)制到一張新表并命名為用戶表2;

2.將用戶表中銷量大于6的數(shù)據(jù)插入到用戶表2;
