insert into t_stock_factor
select * from t_stock_factor_mat a where not exists(select 1 from t_stock_factor b
where a.stock_code=b.stock_code and a.stock_date=b.stock_date and a.factor_name=b.factor_name)
两个表导数据,如果遇见主键不允许重复错误,就用not exists处理,或者就可以新建个临时表处理完两个表重复的再插入数据