1. 程式人生 > >從一個數據庫把數據傳到另外一個數據庫

從一個數據庫把數據傳到另外一個數據庫

一個 數據庫 aging gin mon int 服務器 一個數 ati

前提:在同一個服務器上,至少能訪問到。

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

從一個數據庫把數據傳到另外一個數據庫