Materialized View and task scheduling data synchronization 1. materialized view (materialized view) www.2cto.com create materialized view TEST_MATERIAL_VIEW (materialized view name) refresh force on demandstart WITHTO_DATE ('02-11-2012 14:24:59 ', 'dd-MM-YYYY HH24: MI: SS ') (Start Time) next sysdate + 1/1440 (Execution interval) asselect id, NAME, addr from testtest; (Materialized View query statement) www.2cto.com Remarks: This example indicates, query related field data in the TESTTEST table every minute and display it in the materialized view TEST_MATERIAL_VIEW. That is to say, the data update frequency in TEST_MATERIAL_VIEW is 1 minute and 2. stored PROCEDURE + JOB [1] procedurecreate or replace procedure P_HANDLEB2CCOMMAND (stored PROCEDURE name) isbeginmerge into TEST_PRO W (table to be updated) using testtest ww (associated data or table) ON (W. ID = WW. ID) (Association condition) when matched then update (if conditions are met) set w. NAME = WW. NAME, W. ADDR = WW. addr where w. ID = WW. idwhen not matched then insert (if the condition is NOT met, INSERT) VALUES (WW. ID, WW. NAME, WW. ADDR); END; [2] jobbegin sys. DBMS_JOB.SUBMIT (JOB =>: JOB, WHAT => 'P _ HANDLEB2CCOMMAND; ', NEXT_DATE => TO_DATE ('02-11-2012 14:33:24', 'dd-MM-YYYY HH24: MI: SS '), INTERVAL => 'sysdate + 1/1440'); COMMIT; END; Note: This example shows that the task runs the stored procedure every minute, determine whether the table TEST_PRO to be updated has the corresponding data based on the ID. If yes, update the table as needed. If no table exists, insert the data to ensure that the table TEST_PRO is incremental data.