Implement function: Synchronize the data of Ammeter table in database Db1 to Meter_bill table in DB2
The code is as follows:
insert into Db2.meter_bill (oms_meter_id, house_id, Meter_no, Meter_number, First_quanti ty, zoom, Last_month, last_month_quantity, Last_month_create_date, Current_month, current_month_quantity , current_use_quantity, remark, create_by, Creation_date, last_updated_by, Last_updated_date, Delete_ Flag) select _id, house_id, Water_meter_no , Ext_meter_no, first_quantity, Zoom, Last_month, last_month_quantity, Last_month_create_date, Curren T_month, Current_month_quantity, current_use_quantity, remark, create_by, Creation_date, last_updated_by , Last_updated_date, Delete_flag from db1.ammeter
In fact, the data from the DB1 ammeter table is inserted into the Meter_bill table in DB2, the main is the field names to correspond, mark!
Data about synchronizing tables in different databases