insert into ConsumptiveInstance(deviceMaintenance_id,consumptiveConfig_id) select dm.id,cur.consumptive_id from DeviceMaintenance dm,consumptiveUsedRecord cur where dm.id = cur.deviceMaintenance_id;