Transfer data from one database to another

Premise: On the same server, at least it can be accessed.

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324810439&siteId=291194637