【MySQL】将查询结果插入/新建 进表

将查询结果插入已有表中

insert into table_name(ip,name)
(select ip,name from sample);

insert into 表名(字段名)
(select 字段名 from 表明1 where 条件表达式);

将查询结果插入新建表中

create table test as 
select ip,name from sample;