表已经存在:
insert into 表名 (列名1.。。 列名n) select 列名1.。。。列名n from 表 where 条件
表不存在:
oracle
create table 新表明 as select 列名1.。。。列名n from 表 where 条件
sqlserver
select 列名1.。。。列名n
into 新表名

记录一下呵呵

相关文章: