从一个数据库把数据传到另外一个数据库

前提:在同一个服务器上,至少能访问到。

insert into client_statistics.Installment(ymj_user_id,ymj_installment_id,refer,apply_amount,status,apply_time)
select b.user_id,a.referable_id,a.refer_id,b.apply_amount,b.status,b.apply_time from ymj_money_staging.installments as b
inner join ymj_money_staging.refer_logs as a on a.referable_id= b.id where a.referable_type='Installments';

猜你喜欢

转载自www.cnblogs.com/52forjie/p/8933536.html