insert into table2 (年,月,A,B,C,D)
select to_char(sysdate,'yyyy'),to_char(sysdate,'MM'),A,B,C,D
from table1
where not exists(select 1 from table2 where table1.主键=table2.主键)
最后面where 条件这个判断不存在得可以不写
日期自动填充 可以创建表得时候 字段给默认值 default to_char(sysdate,'yyyymm') 这样