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

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

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';

posted @ 2018-04-24 20:36  forjie  阅读(564)  评论(0编辑  收藏  举报