一、待插入目标表不存在:java
select * from 目标表 from 表 where 条件
二、待插入目标表已经存在:数据库
insert into 目标表 select * from 表 where 条件
三、若是是跨数据库操做的话,将A数据库的atable表所查询的数据所有插入到B数据库的btable表中服务器
select * into B.btable from A.table where 条件
四、跨服务器code
相似3